# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375251 | Edbert2397 | Combo (IOI18_combo) | C++14 | 1 ms | 200 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;
std::string guess_sequence(int N) {
std::string p = "";
char s[4] = {'A','B','X','Y'};
do{
for(int i = 0;i<4;i++){
p += s[i];
}
int coins = press(p);
if(coins == N){
string ans = "";
for(int i = 0;i<3;i++){
ans += s[i];
}
int coins = press(ans);
if(coins == N) {
return ans;
}
else{
ans = "";
for(int i = 1;i<4;i++){
ans += s[i];
}
return ans;
}
}
}while(next_permutation(s,s + 4));
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |