Submission #143735

#TimeUsernameProblemLanguageResultExecution timeMemory
143735yum콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define ff first #define ss second typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<long long, long long> pl; const int MOD = 1e9 + 7; const ll INF = 1e18; const double EPS = 1e-6; string guess_sequence(int N) { vector<char> but = {'A', 'B', 'X', 'Y'}; string ans; if (press("AB") >= 1) ans = press("A") ? "A" : "B"; else ans = press("X") ? "X" : "Y"; but.erase(find(but.begin(), but.end(), but[0])); for (int i = 1; i < N; ++i) { int res = press(ans + but[0] + ans + but[1] + but[0] + ans + but[1] + but[1] + ans + but[1] + but[2]); if (res == 0) ans += but[2]; else if (res == 1) ans += but[0]; else ans += but[1]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...