제출 #348347

#제출 시각아이디문제언어결과실행 시간메모리
348347NachoLibre콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include <bits/stdc++.h> using namespace std; #ifdef wambule int press(string) { return 0; } #else int press(string); #endif string s = ""; int ask(vector<string> v) { assert(v.size() < 5); string c = ""; for(string t : v) { c += s + t; } return press(c) - s.size(); } string guess_sequence(int n) { string c[] = {"X", "Y", "A", "B"}; if(!ask({c[0], c[1]})) { swap(c[0], c[2]); swap(c[1], c[3]); } if(!ask({c[0]})) swap(c[0], c[1]); swap(c[0], c[3]); for(int i = 1; i < n; ++i) { int x = ask({c[0] + c[0], c[0] + c[1], c[0] + c[2], c[1]}); if(x == 2) { s += c[0]; } else if(x == 1) { s += c[1]; } else { s += c[2]; } } if(ask({c[0]})) s += c[0]; else if(ask({c[1]})) s += c[1]; else s += c[2]; return s; } #ifdef wambule int main() { ios::sync_with_stdio(0); cin.tie(0); return 0; } #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...