# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1021008 | Solikha | Combo (IOI18_combo) | C++17 | 33 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 "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int N) {
string s = "", t = "ABXY", tmp = "";
for(int i = 0; i < 4; i++){
if(press(s + t[i]) == 1){
s += t[i];
}
}
for(int i = 0; i < 4; i++){
if (t[i] != s[0]) tmp += t[i];
}
while(press(s) != N){
for(int i = 0; i < 3; i++){
if(press(s + tmp[i]) == s.size() + 1){
s += tmp[i]; break;
}
}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |