제출 #600108

#제출 시각아이디문제언어결과실행 시간메모리
600108Fidan콤보 (IOI18_combo)C++17
30 / 100
46 ms456 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; typedef int ll; vector<char> v(3); string guess_sequence(int N) { string s=""; ll k1=press("A"), k2=press("B"), k3=press("X"); if(k1==1){ v[0]='B', v[1]='X', v[2]='Y'; s="A"; } else if(k2==1){ v[0]='A', v[1]='X', v[2]='Y'; s="B"; } else if(k3==1){ v[0]='A', v[1]='B', v[2]='Y'; s="X"; } else{ v[0]='A', v[1]='B', v[2]='X'; s="Y"; } ll l=1, a; while(l<N){ l++; s+=v[0]; a=press(s); if(a==l) continue; s.pop_back(); s+=v[1]; a=press(s); if(a==l) continue; s.pop_back(); s+=v[2]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...