Submission #1322207

#TimeUsernameProblemLanguageResultExecution timeMemory
1322207aritro_Combo (IOI18_combo)C++20
10 / 100
16 ms444 KiB
#include<bits/stdc++.h>
using namespace std;

int press(string p);

string guess_sequence(int n){
    string ans="";
    int cur=1;
    if(press("A")==1) ans+="A";
    else if(press("B")==1) ans+="B";
    else if(press("X")==1) ans+="X";
    else ans+="Y";
    while(cur<n){
        if(ans[0]!='A'&&press(ans+'A')>cur){
            cur++;
            ans+='A';
        }else if(ans[0]!='B'&&press(ans+'B')>cur){
            cur++;
            ans+='B';
        }else if(ans[0]!='X'&&press(ans+'X')>cur){
            cur++;
            ans+='X';
        }else if(ans[0]!='Y'){
            cur++;
            ans+='Y';
        }
    }
    return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...