제출 #1141954

#제출 시각아이디문제언어결과실행 시간메모리
1141954FZ_Laabidi콤보 (IOI18_combo)C++20
10 / 100
15 ms460 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N) { vector<string> u={"A", "B", "X", "Y"}; int coin = 0, k=0; while(coin==0){ coin = press(u[k]); k++; } k--; string p = ""; p+=(u[k]); u[k]="1"; sort(u.begin(), u .end()); for(int i=1; i<N; i++){ for(int j = 1; j<4; j++){ coin =press(p+u[j]); if(coin==i)continue; p+=u[j]; break; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...