# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986828 | Tsagana | Combo (IOI18_combo) | C++14 | 28 ms | 596 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 "combo.h"
#include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define eb emplace_back
#define F first
#define S second
using namespace std;
char ch(char c) {
if (c == 'A') return 'B';
if (c == 'B') return 'X';
if (c == 'X') return 'Y';
if (c == 'Y') return 'A';
}
string guess_sequence(int N) {
string p = "";
string s = "";
int leng = 0;
int coin = 0;
char c = 'A';
while (leng < N) {
p = s;
for (int i = leng; i < N; i++) p += c;
coin = press(p);
if (coin > leng) for (; leng < coin; leng++) s += c;
else c = ch(c);
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |