Score : 1100 points
This is an interactive task.
You have to guess a secret password S. A password is a nonempty string whose length is at most L. The characters of a password can be lowercase and uppercase english letters (a, b, ... , z, A, B, ... , Z) and digits (0, 1, ... , 9).
In order to guess the secret password S you can ask queries. A query is made of a valid password T, the answer to such query is the edit distance between S and T (the operations considered for the edit distance are: removal, insertion, substitution). You can ask at most Q queries.
Note: For a definition of edit distance (with operations: removal, insertion, substitution), see this wikipedia page.
To ask a query, print on Standard Output (with a newline at the end)
? T
The string T must be a valid password.
The answer ans to each query shall be read from Standard Input in the form:
ans
As soon as you have determined the hidden password S, you should print on Standard Output (with a newline at the end)
! S
and terminate your program.
TLE.WA.?) or if your program crashes or if you ask more than Q queries, the behavior of the judge is undefined (it does not necessarily give WA).In the only sample testcase of this problem the hidden password is Atcod3rIsGreat.
The following one is an example of interaction if S=Atcod3rIsGreat.
| Input | Output |
|---|---|
| \texttt{? AtcoderIsBad} | |
| 5 | |
| \texttt{? AtcoderIsGreat} | |
| 1 | |
| \texttt{! Atcod3rIsGreat} |