제출 #928807

#제출 시각아이디문제언어결과실행 시간메모리
928807Darren0724콤보 (IOI18_combo)C++17
100 / 100
12 ms2236 KiB
#include "combo.h" #include "bits/stdc++.h" //#include "grader.cpp" using namespace std; string guess_sequence(int n) { string s,t="ABXY"; int k=(press("BY")>0)+(press("XY")>0)*2; rotate(t.begin(),t.begin()+k,t.end()); s.push_back(t[0]); for (int i=0; i<n-2; ++i) { int a=press(s+t[2]+s+t[3]+t[1]+s+t[3]+t[2]+s+t[3]+t[3])-i; a=min(a,3); s.push_back(t[a]); } if(n==1)return s; k=(press(s+"B"+s+"Y")==n)+(press(s+"X"+s+"Y")==n)*2; s.push_back("ABXY"[k]); return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...