# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1117316 | Ciprian | Password (RMI18_password) | C++14 | 0 ms | 0 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;
#define int long long
int query(string s);
string guess(int n, int s){
char a='a';
vector<char>c;
char b[30];
for(int j=1; i<=s; j++){
if(query(a)==1)c.push_back(a);
a++;
}
for(int j=0; j<c.size(); j++){
int cnt=0;
for(int i=0; i<c.size(); i++){
if(j!=i){
if(query(c[i]+c[j])==2)cnt++;
}
}b[cnt]=c[j];
}for(int j=0; j<n; j++)cout<<b[j];
}