# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
690519 | zeroesandones | Combo (IOI18_combo) | C++17 | 1 ms | 256 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
using ll = long long;
using vi = vector<long long>;
#define pb emplace_back
std::string guess_sequence(int N) {
char start;
if(press("A"))
start = 'A';
else if (press("B"))
start = 'B';
else if(press("X"))
start = 'C';
else
start = 'Y';
string res;
res += start;
set<char> moves{'A', 'B', 'X', 'Y'};
moves.erase(start);
vector<char> left;
for(auto x : moves)
left.pb(x);
for(int i = 1; i < N - 1; ++i) {
string curr = res + left[0] + res + left[1] + left[0] + res + left[1] + left[1] + res + left[1] + left[2];
ll gain = press(curr);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |