# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141926 | FZ_Laabidi | Combo (IOI18_combo) | C++20 | 1 ms | 408 KiB |
#include<bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int N) {
if(N==3){
vector<string> u={"A", "B", "X", "Y"};
int coin = 0, i=1;
while(coin==0){
coin = press(u[i]);
i++;
}
i--;
string p = "";
p+=(u[i]);
u[i]="1";sort(u.begin(), u .end());
for(int i=1; i<N; i++){
for(int j = 1; j<4; j++){
coin =press(p+u[j]);
if(coin==i)continue;
p+=u[j]; break;
}
}
return p;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |