Submission #1369617

#TimeUsernameProblemLanguageResultExecution timeMemory
1369617hasanCombo (IOI18_combo)C++20
30 / 100
7 ms456 KiB
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;

vector<char> kk,k={'A','B','X','Y'};

string guess_sequence(int n){
    int cnt=0;
    string ans="";
    for(int i=0; i<n; i++){
        if(i==0){
            int j=0;
            ans.push_back(k[j]);
            while(j<3 && press(ans)!=ans.size()){
                j++;
                cnt++;
                ans.pop_back();
                ans.push_back(k[j]);
            }
            for(int r=0; r<4; r++)
                if(j!=r) kk.push_back(k[r]);
        }
        else{
            int j=0;
            ans.push_back(kk[j]);
            while(j<2 && press(ans)!=ans.size()){
                j++;
                cnt++;
                ans.pop_back();
                ans.push_back(kk[j]);
            }
        }
    }
    return ans;
}
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...