Submission #800607

#TimeUsernameProblemLanguageResultExecution timeMemory
800607iskhakkutbilimCombo (IOI18_combo)C++14
10 / 100
58 ms572 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define ff first #define ss second #define all(a) a.begin(), a.end() /* int press(string s){ return 1; } */ string guess_sequence(int N){ string ans = ""; if(press("A") == 1){ ans.push_back('A'); }else if(press("B") == 1){ ans.push_back('B'); }else if(press("X") == 1){ ans.push_back('X'); }else{ ans.push_back('Y'); } set<char> chars; chars.insert('A'); chars.insert('B'); chars.insert('X'); chars.insert('Y'); chars.erase(ans[0]); for(int i = 2;i <= N; i++){ for(char ch : chars){ if(press(ans+ch) == i){ ans.push_back(ch); break; } } } if((int)ans.size() != N) assert(false); return ans; } /* main(){ int n; cin >> n; cout << guess_sequence(n); return 0; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...