제출 #1317874

#제출 시각아이디문제언어결과실행 시간메모리
1317874ninstroyer콤보 (IOI18_combo)C++20
0 / 100
0 ms332 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; //A,B,X,Y vector<string> choices = {"A","B","X","Y"}; string guess_sequence(int n) { string p = ""; char first; if(press("A")) p += "A"; else if(press("B")) p += "B"; else if(press("X")) p += "X"; else p += "Y"; first = p[0]; int cur = 1; for(int i = 2; i <= n; i++) { for(auto c : choices) { if(c[0]==p[0]) continue; else if(press(c) > cur) { p += c; cur++; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...