제출 #1325899

#제출 시각아이디문제언어결과실행 시간메모리
1325899x_a콤보 (IOI18_combo)C++20
0 / 100
0 ms332 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string p = "", s = ""; int last = 0; char t = 'x'; vector<char> A = {'A', 'B', 'X', 'Y'}; for (int i = 0; i < N; ++i) { p = s; int cnt = 0; for(int j = 0; j < 4; j ++){ if(t == A[j]) continue; if(cnt == 2 && j){ last ++; s += A[j]; break; } int x = press(p + A[j]); if(x > last){ if(last == 0){ t = A[j]; } s += A[j]; last = x; break; } else{ cnt ++; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...