Submission #719881

#TimeUsernameProblemLanguageResultExecution timeMemory
719881AirCirclesCombo (IOI18_combo)C++17
100 / 100
38 ms572 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define PB push_back typedef vector<int> vec; string guess_sequence(int N){ string s=""; char a,b,c,d; if(press("AB")>0){ if(press("A")==1){ a='A';b='B';c='X';d='Y'; }else{ a='B';b='A';c='X';d='Y'; } }else{ if(press("X")==1){ a='X';b='B';c='A';d='Y'; }else{ a='Y';b='B';c='X';d='A'; } } s+=a; for(int l=1;l<N-1;l++){ int coin=press(s+c+s+d+b+s+d+c+s+d+d); if(coin==l){ s+=b; }else{ if(coin==l+1){ s+=c; }else{ s+=d; } } } if(N>1){ int coin=press(s+b+s+c); if(coin==N){ if(press(s+b)==N){ s+=b; }else{ s+=c; } }else{ s+=d; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...