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 <stdio.h>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define ll long long
#define pb push_back
int query(string str);
string guess(int n, int s){
string ans = "";
int cur = 0;
for (int i = 1; i <= n; ++i){
string q = ans;
for (int j = 0; j <= (int)q.size(); ++j){
string q2 = "";
int ok = 0;
for (int k = 0; k < s; ++k){
q2 = "";
char ch = 'a';
ch += k;
for (int nx = 0; nx < j; ++nx){
q2 += q[nx];
}
q2 += ch;
for (int nx = j; nx < (int)q.size(); ++nx){
q2 += q[nx];
}
int kek = query(q2);
if (kek > cur){
ans = q2;
ok = 1;
break;
}
}
if (ok)
break;
}
cur += 1;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |