Submission #9207

# Submission time Handle Problem Language Result Execution time Memory
9207 2014-09-28T04:41:03 Z altertain Veni, vidi, vici (kriii2_V) C++
4 / 4
0 ms 1676 KB
#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 time Memory Grader output
1 Correct 0 ms 1676 KB Output is correct
2 Correct 0 ms 1676 KB Output is correct
3 Correct 0 ms 1676 KB Output is correct
4 Correct 0 ms 1676 KB Output is correct
5 Correct 0 ms 1676 KB Output is correct
6 Correct 0 ms 1676 KB Output is correct
7 Correct 0 ms 1676 KB Output is correct
8 Correct 0 ms 1676 KB Output is correct
9 Correct 0 ms 1676 KB Output is correct
10 Correct 0 ms 1676 KB Output is correct
11 Correct 0 ms 1676 KB Output is correct
12 Correct 0 ms 1676 KB Output is correct
13 Correct 0 ms 1676 KB Output is correct
14 Correct 0 ms 1676 KB Output is correct
15 Correct 0 ms 1676 KB Output is correct
16 Correct 0 ms 1676 KB Output is correct
17 Correct 0 ms 1676 KB Output is correct
18 Correct 0 ms 1676 KB Output is correct
19 Correct 0 ms 1676 KB Output is correct
20 Correct 0 ms 1676 KB Output is correct
21 Correct 0 ms 1676 KB Output is correct
22 Correct 0 ms 1676 KB Output is correct
23 Correct 0 ms 1676 KB Output is correct
24 Correct 0 ms 1676 KB Output is correct
25 Correct 0 ms 1676 KB Output is correct
26 Correct 0 ms 1676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1676 KB Output is correct
2 Correct 0 ms 1676 KB Output is correct
3 Correct 0 ms 1676 KB Output is correct
4 Correct 0 ms 1676 KB Output is correct
5 Correct 0 ms 1676 KB Output is correct
6 Correct 0 ms 1676 KB Output is correct
7 Correct 0 ms 1676 KB Output is correct
8 Correct 0 ms 1676 KB Output is correct
9 Correct 0 ms 1676 KB Output is correct
10 Correct 0 ms 1676 KB Output is correct
11 Correct 0 ms 1676 KB Output is correct
12 Correct 0 ms 1676 KB Output is correct
13 Correct 0 ms 1676 KB Output is correct
14 Correct 0 ms 1676 KB Output is correct
15 Correct 0 ms 1676 KB Output is correct
16 Correct 0 ms 1676 KB Output is correct
17 Correct 0 ms 1676 KB Output is correct
18 Correct 0 ms 1676 KB Output is correct
19 Correct 0 ms 1676 KB Output is correct
20 Correct 0 ms 1676 KB Output is correct
21 Correct 0 ms 1676 KB Output is correct
22 Correct 0 ms 1676 KB Output is correct
23 Correct 0 ms 1676 KB Output is correct
24 Correct 0 ms 1676 KB Output is correct
25 Correct 0 ms 1676 KB Output is correct
26 Correct 0 ms 1676 KB Output is correct