제출 #142693

#제출 시각아이디문제언어결과실행 시간메모리
142693triplem5ds콤보 (IOI18_combo)C++14
30 / 100
63 ms432 KiB
#include "combo.h" //#include "grader.cpp" #include <bits/stdc++.h> using namespace std; set<char> go = {'A','B','X','Y'}; std::string guess_sequence(int N) { std::string p = ""; if(press("AB")){ if(press("A")==1)p="A"; else p = "B"; } else { if(press("X") == 1)p = "X"; else p = "Y"; } go.erase(p[0]); for(int i = 1; i < N; i++){ for(auto c : go){ p.push_back(c); if(c == *go.rbegin())break; int x = press(p); if(x > i){ break; } p.pop_back(); } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...