제출 #1322334

#제출 시각아이디문제언어결과실행 시간메모리
1322334aritro_Combo (IOI18_combo)C++20
97 / 100
7 ms476 KiB
#include<bits/stdc++.h> using namespace std; int press(string p); string guess_sequence(int n){ string ans=""; int cur=1; if(press("A")==1) ans+="A"; else if(press("B")==1) ans+="B"; else if(press("X")==1) ans+="X"; else ans+="Y"; char f=ans[0]; string op; if(f=='A') op="BXY"; if(f=='B') op="AXY"; if(f=='X') op="ABY"; if(f=='Y') op="ABX"; if(n==1) return ans; while(cur+1!=n){ int tem=press(ans+op[0]+ans+op[1]+op[0]+ans+op[1]+op[1]+ans+op[1]+op[2]); if(tem==cur) ans+=op[2]; if(tem==cur+1) ans+=op[0]; if(tem==cur+2) ans+=op[1]; cur++; } if(press(ans+op[0])==n) ans+=op[0]; else if(press(ans+op[1])==n) ans+=op[1]; else ans+=op[2]; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...