Submission #588715

#TimeUsernameProblemLanguageResultExecution timeMemory
588715shezittCombo (IOI18_combo)C++14
10 / 100
54 ms444 KiB
#include "combo.h" #include <bits/stdc++.h> #define dbg(x) cerr << #x << ": " << x << endl; #define raya cerr << "======================" << endl; using namespace std; string guess_sequence(int N) { string s = ""; string aux = "ABXY"; for(int j=0; j<4; ++j){ if(j == 3){ s += aux[j]; break; } s += aux[j]; if(press(s)){ break; } s.pop_back(); } for(int i=1; i<N; ++i){ for(int j=0; j<4; ++j){ if(aux[j] == s[0]){ continue; } if(j == 3){ s += aux[j]; break; } s += aux[j]; if(press(s) == i+1){ break; } s.pop_back(); } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...