Submission #538219

#TimeUsernameProblemLanguageResultExecution timeMemory
538219EZiganshinCombo (IOI18_combo)C++17
10 / 100
147 ms408 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; const int K = 4; vector<string> key = {"A", "B", "X", "Y"}; string get_string(vector<int> &a) { string res; for (int x: a) { res += key[x]; } return res; } int n; string guess_sequence(int N) { n = N; vector<int> v; for (int i = 0; i < n; i++) { for (int j = 0; j < K; j++) { v.push_back(j); if (press(get_string(v)) == i + 1) { break; } v.pop_back(); } } return get_string(v); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...