标签:show class lease help man its case fbi tom
http://acm.hdu.edu.cn/showproblem.php?pid=2140
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
char s[maxn];
char a[11]={‘b‘, ‘q‘, ‘t‘, ‘m‘, ‘i‘, ‘c‘, ‘a‘, ‘e‘, ‘l‘};
char b[11]={‘ ‘, ‘,‘, ‘!‘, ‘l‘, ‘e‘, ‘a‘, ‘c‘, ‘i‘, ‘m‘};
int main() {
while(~scanf("%s", s)) {
int len = strlen(s);
for(int i = 0; i < len; i ++) {
if(s[i] == ‘b‘)
s[i] = ‘ ‘;
else if(s[i] == ‘t‘)
s[i] = ‘!‘;
else if(s[i] == ‘m‘)
s[i] = ‘l‘;
else if(s[i] == ‘i‘)
s[i] = ‘e‘;
else if(s[i] == ‘c‘)
s[i] = ‘a‘;
else if(s[i] == ‘a‘)
s[i] = ‘c‘;
else if(s[i] == ‘e‘)
s[i] = ‘i‘;
else if(s[i] == ‘l‘)
s[i] = ‘m‘;
else if(s[i] == ‘q‘)
s[i] = ‘,‘;
}
printf("%s\n", s);
}
return 0;
}
HDU 2140 Michael Scofield's letter
标签:show class lease help man its case fbi tom
原文地址:https://www.cnblogs.com/zlrrrr/p/9410836.html