Submission #498069

#TimeUsernameProblemLanguageResultExecution timeMemory
498069IOI_champion_in_1980Combo (IOI18_combo)C++14
0 / 100
0 ms200 KiB
#include<bits/stdc++.h> using namespace std; int a, b, c, d, e, n, m; string s, t, st; int press(string p); string guess_sequence(int n) { //int main() { s="ABXY"; string yok="", p=""; for (a=0; a<3; a++) { string k; k=k+s[a]; if (press(k)==1) { p=p+s[a]; break; } else { yok=yok+s[a]; } } if (p.length()==0) p=p+s[3]; else yok=yok+s[3]; for (a=2; a<=n-1; a++) { int k=press(p+yok[0]+yok[0]+p+yok[0]+yok[1]+p+yok[0]+yok[2]+p+yok[1]); if (k==2) p=p+yok[0]; else if (k==1) p=p+yok[1]; else p=p+yok[2]; } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...