# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
849488 | Bach21 | Combo (IOI18_combo) | C++14 | 20 ms | 1464 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;
const int m=4;
string gue="ABXY";
string guess_sequence(int N) {
string s="";
string tmp="";
int cnt=0;
for (int i=0;i<N;i++) {
bool check=0;
for (int trie = 0; trie < gue.size()-1; trie++) {
tmp = s;
tmp += gue[trie];
cnt = press(tmp);
if (cnt > s.size()) {
s+=gue[trie];
if (i==0) gue.erase(gue.begin()+trie);
check=1;
break;
}
}
if (!check)
{
s+=gue[gue.size()-1];
if (i==0) gue.erase(gue.begin()+gue.size()-1);
}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |