제출 #1325909

#제출 시각아이디문제언어결과실행 시간메모리
1325909x_a콤보 (IOI18_combo)C++20
30 / 100
11 ms448 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; int j = 0; while(true){ if(t == A[j]) { j ++; continue; } if((cnt == 2 && i) || (cnt == 3 && i == 0)){ 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 ++; } j ++; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...