# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
440923 | beferith | Combo (IOI18_combo) | C++14 | 42 ms | 444 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){
vector<string> chr = {"A","B","X","Y"};
string curr = "";
for(int i=0;i<N;i++){
bool found = false;
for(int j=0;j<chr.size()-1;j++){
if(press(curr + chr[j]) == i+1){
curr += chr[j];
found = true;
break;
}
}
if(!found){
curr += chr[chr.size()-1];
}
if(!i){
chr.erase(find(chr.begin(),chr.end(),curr));
}
}
return curr;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |