제출 #999077

#제출 시각아이디문제언어결과실행 시간메모리
999077Unforgettablepl콤보 (IOI18_combo)C++17
30 / 100
33 ms964 KiB
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() int press(std::string p); std::string guess_sequence(int N) { string curr; if(press("A")==1)curr="A"; else if(press("B")==1)curr="B"; else if(press("X")==1)curr="X"; else curr="Y"; vector<string> options; if(curr[0]!='A')options.emplace_back("A"); if(curr[0]!='B')options.emplace_back("B"); if(curr[0]!='X')options.emplace_back("X"); if(curr[0]!='Y')options.emplace_back("Y"); for(int i=2;i<=N;i++){ if(press(curr+options[0])==i)curr+=options[0]; else if(press(curr+options[1])==i)curr+=options[1]; else curr+=options[2]; } return curr; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...