This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <algorithm>
using namespace std;
char line[104857600];
int main(){
int n;
fgets(line, sizeof(line), stdin);
sscanf(line,"%d",&n);
fgets(line, sizeof(line), stdin);
int sm = 0, cn = 0;
for(int i = 0; line[i] != '\0'; i++) {
if (line[i] == ' ' || line[i] == '\n' || line[i] == '\r') {
sm = 0;
cn = 0;
printf("%c", line[i]);
} else {
sm += line[i]-'a';
cn++;
if (cn == 2) {
printf("%c", (sm+26-n)%26+'a');
cn = sm = 0;
}
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |