제출 #101657

#제출 시각아이디문제언어결과실행 시간메모리
101657lolicon콤보 (IOI18_combo)C++14
5 / 100
2 ms200 KiB
#include "combo.h" #include<algorithm> using namespace std; string guess_sequence(int N){ string s, c = "ABXY"; int i, t, coin; if(press("AB")){ if(press("A")) { s += "A"; swap(c[0],c[3]); } else { s += "B"; swap(c[1],c[3]); } } else { if(press("X")){ s += "X"; swap(c[2],c[3]); } else { s += "Y"; } } coin = 1; for(i=1;i<N-1;i++){ t = press(s+c[0]+s+c[1]+c[0]+s+c[1]+c[1]+s+c[1]+c[2]) - coin; if(t == 0){ s += c[2]; } else if(t == 1){ s += c[0]; } else { s += c[1]; } coin++; } if(press(s+c[0]) == coin+1) s += c[0]; else if(press(s+c[1]) == coin+1) s += c[1]; else s += c[2]; return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...