Submission #1002359

#TimeUsernameProblemLanguageResultExecution timeMemory
1002359Br3adCombo (IOI18_combo)C++17
10 / 100
57 ms960 KiB
#include <iostream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <numeric>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>

using namespace std;
#define ll long long
#define ull unsigned long long
#define f first
#define s second
#define PF push_front
#define PB push_back
#define MP make_pair
#define max(a, b) ((a > b)? a : b)
#define min(a, b) ((a < b)? a : b)
#define max3(a, b, c) max(max(a, b), c)
#define min3(a, b, c) min(min(a, b), c)

const int N = 2e3 + 5;
const int M = 1e9 + 7; 
const int inf = 0x3f3f3f3f;
const ll int INF = 1e18;

int press(string s);

string guess_sequence(int n){
    string str = "";
    char c[4] = {'A', 'B', 'X', 'Y'};
    for(int i = 1; i <= n; i++){
        for(int j = 0; j < 4; j++){
            int cur = press(str + c[j]);
            if(cur == i) {
                str += c[j];
                break;
            }
        }
    }
    return str;
}

// int main(){
    
//     ios::sync_with_stdio(false);
//     cin.tie(NULL);
    
//     // ifstream cin();
//     // ofstream cout();
    
//     string ans;
//     ans = guess_sequence(4);
//     cout << ans << endl;
// }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...