# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
93010 | beso123 | Combo (IOI18_combo) | C++14 | 113 ms | 468 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;
string a="ABXY";
string pas="XAB";
/*int press(string s){
int r=0;
string b="";
for(int k=0;k<pas.size();k++){
b=b+pas[k];
if(s.find(b)==-1)
return r;
r++;
}
return r;
}*/
string guess_sequence(int N){
int r=1;
string s="";
while(s.size()<N){
for(int k=0;k<a.size();k++){
string b=s+a[k];
if(press(b)==r){
s=b;
r++;
break;
}
}
}
return s;
}
/*int main(){
string s=guess_sequence(pas.size());
cout<<s;
return 0;
}*/
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |