Submission #1325900

#TimeUsernameProblemLanguageResultExecution timeMemory
1325900x_aCombo (IOI18_combo)C++20
10 / 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; for(int j = 0; j < 4; j ++){ if(t == A[j]) continue; if(cnt == 2 && i){ 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...