제출 #93370

#제출 시각아이디문제언어결과실행 시간메모리
93370temoyanteladze콤보 (IOI18_combo)C++14
0 / 100
2 ms200 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s="",ch=""; string v="ABXY"; if (press("A")) { s=ch="A"; } if (press("B")) { s=ch="B"; } if (press("X")) { s=ch="X"; } if (press("Y")) { s=ch="Y"; } int k=v.find(ch); v.erase(v.begin()+k); for (int i=2;i<=n;i++) { int p=press(s+v[0]+s+v[1]+v[0]+s+v[1]+v[1]+s+v[1]+v[2]); if (p==i) s+=v[0]; if (p==i+1) s+=v[1]; if (p==i-1) s+=v[2]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...