-
Notifications
You must be signed in to change notification settings - Fork 0
/
A.cpp
38 lines (32 loc) · 829 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Problem: A. Yet Another String Game
// Contest: Codeforces - Codeforces Round #700 (Div. 2)
// URL: https://codeforces.com/contest/1480/problem/A
// Memory Limit: 512 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
const int MAX = 200007;
const int MOD = 1000000007;
void solve() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (i % 2 == 0) {
if (s[i] != 'a') {s[i] = 'a';}
else {s[i] = 'b';}
}
else {
if (s[i] != 'z') {s[i] = 'z';}
else {s[i] = 'y';}
}
}
cout << s << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
//freopen("in.in", "r", stdin); freopen("out.out", "w", stdout);
int tt; cin >> tt; for (int i = 1; i <= tt; i++) {solve();}
//solve();
}