| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 570027 | OrazB | Combo (IOI18_combo) | C++14 | 0 ms | 0 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>
// #define N 100005
#define wr cout << "Continue debugging\n";
#define ll long long int
#define pii pair <int, int>
#define pb push_back
#define ff first
#define ss second
using namespace std;
string guess_sequence(int N){
string t = "ABXY", p = "";
int tr = 0, idx = 0;
for (int i = 0; i < 3; i++){
p.clear(); p += t[i];
if (press(p)){tr = 1; idx = i; break;}
}
if (!tr){
p.clear();
p += t[3];
idx = 3;
}
string tt = "";
for (int i = 0; i < 4; i++) if (idx != i) tt += t[i];
for (int i = 1; i < N; i++){
for (int j = 0; j < 3; j++){
p += tt[j];
if (press(p) == i + 1) break;
p.pop_back();
}
}
return p;
}
// int main ()
// {
// }
