Submission #370109

#TimeUsernameProblemLanguageResultExecution timeMemory
370109AdamGS콤보 (IOI18_combo)C++14
10 / 100
80 ms564 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; #define rep(a, b) for(int a = 0; a < (b); ++a) string guess_sequence(int N) { string ans=""; char T[4]={'A','B','X','Y'}; rep(i, 4) { int p=press(ans+T[i]); if(p==1) { ans+=T[i]; break; } } rep(i, N-1) { rep(j, 4) { if(T[j]!=ans[0]) { int p=press(ans+T[j]); if(p==i+2) { ans+=T[j]; break; } } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...