Submission #1202645

#TimeUsernameProblemLanguageResultExecution timeMemory
1202645okahak71Combo (IOI18_combo)C++20
10 / 100
24 ms464 KiB
#include <bits/stdc++.h>
#include "combo.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define all(X) X.begin(), X.end()
#define allr(X) X.rbegin(), X.rend()
#define pb push_back
#define endl '\n'
using namespace std;
using namespace __gnu_pbds;

int press(string p);

string guess_sequence(int n){
    string res = "";
    ll cnt = 0;
    vector<char>ch = {'A', 'B', 'X', 'Y'};
    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < 4; j ++){
            string temp = res + ch[j];
            ll cur = press(temp);
            if(cur == temp.size()){
                res = temp;
                cnt = cur;
                break;
            }
        }
    }
    return res;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...