# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
973421 | pcc | Password (RMI18_password) | C++17 | 16 ms | 1200 KiB |
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 <bits/stdc++.h>
using namespace std;
int query(string s);
string guess(int N,int S){
string tans;
for(int i = 0;i+S<N;i++){
int l = 0,r = S-1;
string tmp;
while(l != r){
tmp = tans;
int mid = (l+r)>>1;
for(int j = l;j<=mid;j++)tmp += 'a'+j;
if(query(tmp)>i)r = mid;
else l = mid+1;
}
tans += 'a'+l;
}
for(int i = max(0,N-S);i<N;i++){
for(int j = 0;j<S;j++){
tans += 'a'+j;
if(query(tans) == tans.size())break;
tans.pop_back();
}
}
return tans;
}
Compilation message (stderr)
# | 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... |