Submission #464385

# Submission time Handle Problem Language Result Execution time Memory
464385 2021-08-13T06:20:16 Z fuad27 Password (RMI18_password) C++14
0 / 100
486 ms 4040 KB
#include<bits/stdc++.h>
using namespace std;
int query(string s);
string guess(int n, int s) {
	string ans = "";
	for(int i = 0;i<s;i++) {
		ans+=char(i+'a');
	}
	unordered_map<string, int> used;
	do {
		if(used[ans])continue;
		used[ans] = true;
		if(query(ans.substr(0, n)) == n)return ans.substr(0, n);
	}while(next_permutation(ans.begin(), ans.end()));
	return "";
}
# Verdict Execution time Memory Grader output
1 Incorrect 465 ms 4004 KB Could not guess the password with 50000 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Token "-1" doesn't correspond to pattern "[a-b]{1,50}"
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 486 ms 4040 KB Could not guess the password with 50000 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 465 ms 4004 KB Could not guess the password with 50000 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 465 ms 4004 KB Could not guess the password with 50000 queries.
2 Halted 0 ms 0 KB -