This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <cstring>
#include "combo.h"
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
#define pb push_back
#define mp make_pair
#define sz(x) (ll)x.size()
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
string guess_sequence(int N)
{
string ans;
vector<string> have = {"A","B","X","Y"};
for(int i = 0;i<4;i++)
if(press(have[i]) == 1)
{
ans.pb(have[i][0]);
have.erase(have.begin()+i);
break;
}
for(int i = 1;i<N;i++)
{
for(int j = 0;j<3;j++)
if(press(ans+have[j])>i)
{
ans.pb(have[j][0]);
break;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |