HDU:1048.The Hardest Problem Ever

记得 这道题在校赛上遇到过,那时没解得出来,如今来看这道题,感觉实在太水了,也说明这段时间有了进步,继续加油吧,骚年!

#include
#include
char ci[1000000],st[10],en[10];
char Cipher[30]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'},Plain[30]={'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'};
int main(){
    while(scanf("%s",st)!=EOF){
            getchar();
        if(strcmp(st,"ENDOFINPUT")==0)
            break;
        gets(ci);
        scanf("%s",en);
        getchar();
        int len=strlen(ci);
        for(int i=0;i=65&ci[i]<=90)
                printf("%c",Plain[ci[i]-'A']);
            else
                printf("%c",ci[i]);
        }
        printf("\n");
    }
    return 0;
}


 

你可能感兴趣的:(OJ:HDU)