hdu 3079水题
生活随笔
收集整理的這篇文章主要介紹了
hdu 3079水题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
水到什么都不想說了。
/** hdu3079/win.cpp* Created on: 2012-11-4* Author : ben*/ #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <queue> #include <set> #include <map> #include <stack> #include <string> #include <vector> #include <deque> #include <list> #include <functional> #include <numeric> #include <cctype> using namespace std; map<char, char> mymap; void init() {char vowels[] = "aoeiu";char vowels2[] = "AOEIU";char consonant[] = "bcdfghjklmnpqrstvwxyz";char consonant2[] = "BCDFGHJKLMNPQRSTVWXYZ";for(int i = 0; i < 5; i++) {mymap[vowels[i]] = vowels2[i];mymap[vowels2[i]] = vowels2[i];}for(int i = 0; i < 21; i++) {mymap[consonant2[i]] = consonant[i];mymap[consonant[i]] = consonant[i];} } int main() { #ifndef ONLINE_JUDGEfreopen("data.in", "r", stdin); #endifint T, len;char str[200];init();scanf("%d", &T);getchar();while(T--) {gets(str);len = strlen(str);for(int i = 0; i < len; i++) {str[i] = mymap[str[i]];}puts(str);}return 0; }轉(zhuǎn)載于:https://www.cnblogs.com/moonbay/archive/2012/11/04/2753984.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的hdu 3079水题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《软件测试的艺术》
- 下一篇: qq象棋辅助 android,QQ象棋自