# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
873014 | 2023-11-14T10:00:24 Z | vjudge1 | Password (RMI18_password) | C++17 | 57 ms | 692 KB |
#include<bits/stdc++.h> using namespace std; int cnt[200]; int query(string q); string guess(int n, int s) { for(char c='a'; c<'a'+s; c++){ string s; for(int i=0; i<n; i++) s += c; cnt[c] = query(s); } string ans; for(int i=0; i<n; i++){ string t = ans; t += '#'; for(char c='a'; c<'a'+s; c++){ for(int j=1; j<=cnt[c]; j++){ t += c; } bool ok = 0; for(char d='a'; d<'a'+s; d++){ t[ans.size()] = d; if(query(t) == t.size()){ ok = 1; } } if(!ok){ ans += c; cnt[c]--; break; } } } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Returned early from guess() after 346 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 0 ms | 436 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 57 ms | 692 KB | Returned early from guess() after 12373 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Returned early from guess() after 346 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Returned early from guess() after 346 queries. |
2 | Halted | 0 ms | 0 KB | - |