제출 #548315

#제출 시각아이디문제언어결과실행 시간메모리
548315Killer2501콤보 (IOI18_combo)C++14
5 / 100
2 ms208 KiB
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #include "combo.h" using namespace std; using ll = long long; using ld = long double; const int N = 3e5 +2; const int base = 31; const int mod = 1e9 +7; int a[4], k; string c[4] = {"A", "B", "X", "Y"}; string guess_sequence(int n) { string res; for(int i = 1; i < 4; i ++) { if(press(c[i])) { swap(c[i], c[0]); break; } } res += c[0]; for(int i = 2; i < n; i ++) { k = press(res+c[2]+res+c[3]+c[1]+res+c[3]+c[2]+res+c[3]+c[3]); if(k == i-1)res += c[1]; else if(k == i)res += c[2]; else res += c[3]; } for(int i = 1; i < 4; i ++) { if(press(res+c[i]) == n) { res += c[i]; break; } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...