제출 #538218

#제출 시각아이디문제언어결과실행 시간메모리
538218EZiganshin콤보 (IOI18_combo)C++17
5 / 100
2 ms208 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; vector<int> ans, cur; void gen(int pos) { if (pos == N) { if (press(get_string(cur)) == N) { ans = cur; } return; } for (int i = 0; i < K; i++) { cur.push_back(i); gen(pos + 1); cur.pop_back(); } } string guess_sequence(int NN) { N = NN; gen(0); return get_string(ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...