Submission #9649

#TimeUsernameProblemLanguageResultExecution timeMemory
9649YesUjamVeni, vidi, vici (kriii2_V)C++98
0 / 4
0 ms1084 KiB
#include <cstdio> #include <cstring> int main() { int n, cnt=0; char temp[111111], str[103]; scanf("%d", &n); getchar(); gets(temp); int j=0; bool flag = false; while(temp[cnt] != ' ') { if(temp[cnt] == '\n') { flag = true; break; } str[j++] = temp[cnt++]; } cnt++; str[j] = '\0'; while(1) { int len = strlen(str); for(int i=0; i<len; i++) { char y = str[i]; i++; if(i == len) break; char z = str[i]; char x = y-'a'+z-'a'-n; if(x >= 26) x %= 26; while(x<0) { x+=26; } printf("%c", x+'a'); } if(flag || cnt > strlen(temp)) break; printf(" "); int j=0; while(cnt <= strlen(temp) && temp[cnt] != ' ') { if(temp[cnt] == '\n') { flag = true; break; } str[j++] = temp[cnt++]; } cnt++; str[j] = '\0'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...