Submission #9537

# Submission time Handle Problem Language Result Execution time Memory
9537 2014-09-28T07:06:02 Z mrcamel Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1664 KB
#include <cstdio>
#include <iostream>
#include <fstream>
#include <deque>
#include <algorithm>
#include <utility>
#include <vector>
#include <cmath>
#include <queue>
#include <string>
using namespace std;

#define in cin
#define out cout
#define PII pair<int, int>
#define x first
#define y second
#define pi 3.14159265358979323846
#define REP(i, v) for(int i=0; i<v; i++)
#define REPEQ(i, s, e) for(int i=s; i<=e; i++)
#define REPRV(i, s, e) for(int i=s; i>=e; i--)
#define all(v) v.begin(), v.end()
#define long long int int64
#define BIG(a, b) ( (a>b?a:b) )

int main()
{
    //freopen("in.txt", "r+", stdin);
    ios::sync_with_stdio(false);

    int n; in >> n;

    char al[] = "abcdefghijklmnopqrstuvwxyz";

    string str;
    while( in >> str )
    {
        int len = str.size();
        REP(i, len/2)
        {
            char a = str[i*2];
            char b = str[i*2+1];

            out << al[( ((a - 'a') + (b - 'a')) - n) % 26];
        } out << " ";
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1664 KB Output is correct
2 Correct 0 ms 1664 KB Output is correct
3 Correct 0 ms 1664 KB Output is correct
4 Correct 0 ms 1664 KB Output is correct
5 Correct 0 ms 1664 KB Output is correct
6 Correct 0 ms 1664 KB Output is correct
7 Incorrect 0 ms 1664 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -