제출 #744850

#제출 시각아이디문제언어결과실행 시간메모리
744850teo_thrash콤보 (IOI18_combo)C++14
30 / 100
43 ms456 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string p; string S; vector<char> let; if(press("A")){ S+="A"; let.push_back('B'); let.push_back('X'); let.push_back('Y'); }else{ if(press("B")){ S+="B"; let.push_back('A'); let.push_back('X'); let.push_back('Y'); }else{ if(press("X")){ S+="X"; let.push_back('A'); let.push_back('B'); let.push_back('Y'); }else{ S+="Y"; let.push_back('A'); let.push_back('B'); let.push_back('X'); } } } for(int i=2; i<=n; i++){ bool guessed=false; for(int j=0; j<2; j++){ char c=let[j]; if(press(S+c)==i){ S+=c; guessed=true; break; } } if(!guessed){ S+=let[2]; } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...