yusijia’s blog hdu 1048

Contents

链接

题目大意:

  • 给你一段明文和暗文,让你把输入的暗文翻译成明文
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28


#include <cstring>

char str[27] = "VWXYZABCDEFGHIJKLMNOPQRSTU";

int ()
{
char a[1000], b[1000];
int i;
while(gets(a)){
if(strcmp(a, "START") == 0)
memset(b, 0, sizeof(b));
else if(strcmp(a, "END") == 0)
printf("%sn", b);
else if(strcmp(a, "ENDOFINPUT") == 0)
break;
else{
for(int i = 0; a[i] != '