제출 #407388

#제출 시각아이디문제언어결과실행 시간메모리
407388ngrace콤보 (IOI18_combo)C++14
10 / 100
78 ms528 KiB
#include "combo.h" #include <string> #include <vector> using namespace std; std::string guess_sequence(int N) { vector<char> but = {'A','B','X','Y'}; string s = ""; //find first char start='1'; for(char c : but){ if(press(string(1,c))==1){ s.push_back(c); start=c; break; } } for(int i=1;i<N;i++){ for(char c:but){ if(c==start){ continue; } s.push_back(c); if(press(s)>i){ break; } s.pop_back(); } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...