# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962594 | Mohamed_Kachef06 | Combo (IOI18_combo) | C++17 | 1 ms | 344 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"
//#include "grader.cpp"
using namespace std;
string guess_sequence(signed N){
char a[] = {'A' , 'B' , 'X' , 'Y'};
string s;
if (s.empty()) for (int i = 0 ; i < 4 ; i++) {if (press(s+a[i])) {s+=a[i]; break;}};
for (int i = 0 ; i < N-1 ; i++){
random_shuffle(a , a+4);
if (a[i] != s[0]) if (press(s+a[i]) > s.size()) {s+=a[i]; break;}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |