# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
855667 | 2023-10-01T16:12:51 Z | franfill | Password (RMI18_password) | C++17 | 260 ms | 1792 KB |
#include<bits/stdc++.h> using namespace std; int query(string S); string cur = ""; int N, S; void solve(int i, vector < bool > us) { if (cur.size() == N) return; for (int c = 0; c < S; c++) if (us[c]) { string tr = cur.substr(0, i); tr += char('a'+c); tr += cur.substr(i, cur.size()-i); if (query(tr) == tr.size()) { cur = tr; solve(i+1, us); solve(i, us); return; } else us[c] = false; } } string guess(int N, int S) { ::N = N; ::S = S; cur = ""; vector < bool > us(S, true); solve(0, us); return cur; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Guessed the password with 144 queries. |
2 | Correct | 1 ms | 344 KB | Guessed the password with 316 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Guessed the password with 120 queries. |
2 | Correct | 2 ms | 436 KB | Guessed the password with 236 queries. |
3 | Correct | 1 ms | 436 KB | Guessed the password with 126 queries. |
4 | Correct | 2 ms | 440 KB | Guessed the password with 330 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1500 KB | Guessed the password with 5813 queries. |
2 | Correct | 57 ms | 1664 KB | Guessed the password with 12053 queries. |
3 | Correct | 74 ms | 1388 KB | Guessed the password with 15976 queries. |
4 | Correct | 104 ms | 1792 KB | Guessed the password with 22882 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Guessed the password with 144 queries. |
2 | Correct | 1 ms | 344 KB | Guessed the password with 316 queries. |
3 | Correct | 1 ms | 344 KB | Guessed the password with 120 queries. |
4 | Correct | 2 ms | 436 KB | Guessed the password with 236 queries. |
5 | Correct | 1 ms | 436 KB | Guessed the password with 126 queries. |
6 | Correct | 2 ms | 440 KB | Guessed the password with 330 queries. |
7 | Correct | 29 ms | 1500 KB | Guessed the password with 5813 queries. |
8 | Correct | 57 ms | 1664 KB | Guessed the password with 12053 queries. |
9 | Correct | 74 ms | 1388 KB | Guessed the password with 15976 queries. |
10 | Correct | 104 ms | 1792 KB | Guessed the password with 22882 queries. |
11 | Incorrect | 260 ms | 1280 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Guessed the password with 144 queries. |
2 | Correct | 1 ms | 344 KB | Guessed the password with 316 queries. |
3 | Correct | 1 ms | 344 KB | Guessed the password with 120 queries. |
4 | Correct | 2 ms | 436 KB | Guessed the password with 236 queries. |
5 | Correct | 1 ms | 436 KB | Guessed the password with 126 queries. |
6 | Correct | 2 ms | 440 KB | Guessed the password with 330 queries. |
7 | Correct | 29 ms | 1500 KB | Guessed the password with 5813 queries. |
8 | Correct | 57 ms | 1664 KB | Guessed the password with 12053 queries. |
9 | Correct | 74 ms | 1388 KB | Guessed the password with 15976 queries. |
10 | Correct | 104 ms | 1792 KB | Guessed the password with 22882 queries. |
11 | Incorrect | 260 ms | 1280 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |