Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- // ios::sync_with_stdio(0);
- // cin.tie(0);
- map<int, char> mp;
- int ch = -25;
- for(int i = 0; i < 26; i++)
- mp[ch] = char(i + 'a'), ch += 2;
- int n;
- cin >> n;
- string s;
- for(int i = 0; i < n; i++)
- s.push_back('a');
- for(int i = 0; i < n; i++)
- {
- cout << s << endl;
- int before = -1;
- cin >> before;
- if(before == 0)
- return 0;
- s[i] = 'z';
- cout << s << endl;
- int after = -1;
- cin >> after;
- if(after == 0)
- return 0;
- s[i] = mp[before - after];
- }
- cout << s << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement