Submission #164328

#TimeUsernameProblemLanguageResultExecution timeMemory
164328aggu_01000101Combo (IOI18_combo)C++14
0 / 100
104 ms256 KiB
#include <iostream>
#include <string>
#include <unordered_map>
#include <cstring>
#include <chrono>
#include <vector>
#include <map>
#include <random>
#include <set>
#include <algorithm>
#include <math.h>
#include <cstdio>
#include <stdio.h>
#include <assert.h>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <deque>
#include <cassert>
#include <stack>
#include "combo.h"
using namespace std;
 
string seq[4] = {"A", "B", "X", "Y"};
int n, let1 = 3;
 
 
string guess_sequence(int N) {
    char lol[] = {'A', 'B', 'X', 'Y'};
    int taken = 0;
    while(press("" + lol[taken])==0) taken++;
    string s = "" + lol[taken];
    for(int i = 1;i<n;i++){
        for(int j = 0;j<4;j++){
            if(j==taken) continue;
            int rn = press(s + lol[j]);
            if(rn==(i+1)){
                s = s+lol[j];
                j = 5;
            }
        }
    }
    return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...