Submission #9207

#TimeUsernameProblemLanguageResultExecution timeMemory
9207altertainVeni, vidi, vici (kriii2_V)C++98
4 / 4
0 ms1676 KiB
#include <vector> #include <map> #include <set> #include <stack> #include <algorithm> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <string> #include <cctype> #include <cstring> #include <queue> #include <cassert> using namespace std; typedef long long LL; typedef vector<string> VS; typedef vector<int> VI; typedef pair<int,int> PII; typedef vector<PII> VPII; #define MP make_pair #define ST first #define ND second #define PB push_back #define FOR(i,a,b) for( int i=(a); i<(b); ++i) #define FORD(i,a,b) for( int i=(a); i>(b); --i) #define REP(i,n) for(int i=0; i<(n); ++i) #define ALL(X) (X).begin(),(X).end() #define SZ(X) (int)(X).size() #define FORE(it,X) for(__typeof((X).begin()) it=(X).begin(); it!=(X).end();++it) int m; char dt[128]; int n; int main() { cin>>m; while(scanf("%s", dt) > 0) { n = strlen(dt); for (int i = 0; i+1 < n; i += 2) { int v = (dt[i]-'a'+dt[i+1]-'a') - m; v %= 26; if (v < 0) v += 26; printf("%c",v + 'a'); } printf(" "); } printf("\n"); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...