# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
755898 | 2023-06-10T17:30:01 Z | MohamedFaresNebili | Password (RMI18_password) | C++14 | 600 ms | 288 KB |
#include <bits/stdc++.h> using namespace std; string st; int k; int query(string str); string guess(int n, int s) { string S(n, 'a'); int freq[s]{0}; for(int l = 0; l < s; l++) { for(int i = 0; i < n; i++) S[i] = char('a' + l); freq[l] = query(S); } S = ""; for(int l = 0; l < s; l++) { for(int i = 0, last = 0; i < freq[l]; i++) { for(int j = last;; j++) { string str = ""; for(int e = 0; e < j; e++) str.push_back(S[e]); str.push_back(char('a' + l)); for(int e = j; e < S.size(); e++) str.push_back(S[e]); if(query(str) == str.size()) { S = str; last++; break; } } } } return S; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 77 queries. |
2 | Correct | 2 ms | 208 KB | Guessed the password with 188 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 208 KB | Guessed the password with 161 queries. |
2 | Correct | 4 ms | 208 KB | Guessed the password with 629 queries. |
3 | Correct | 2 ms | 208 KB | Guessed the password with 112 queries. |
4 | Correct | 19 ms | 208 KB | Guessed the password with 1469 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 600 ms | 288 KB | Could not guess the password with 50000 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 77 queries. |
2 | Correct | 2 ms | 208 KB | Guessed the password with 188 queries. |
3 | Correct | 3 ms | 208 KB | Guessed the password with 161 queries. |
4 | Correct | 4 ms | 208 KB | Guessed the password with 629 queries. |
5 | Correct | 2 ms | 208 KB | Guessed the password with 112 queries. |
6 | Correct | 19 ms | 208 KB | Guessed the password with 1469 queries. |
7 | Incorrect | 600 ms | 288 KB | Could not guess the password with 50000 queries. |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 77 queries. |
2 | Correct | 2 ms | 208 KB | Guessed the password with 188 queries. |
3 | Correct | 3 ms | 208 KB | Guessed the password with 161 queries. |
4 | Correct | 4 ms | 208 KB | Guessed the password with 629 queries. |
5 | Correct | 2 ms | 208 KB | Guessed the password with 112 queries. |
6 | Correct | 19 ms | 208 KB | Guessed the password with 1469 queries. |
7 | Incorrect | 600 ms | 288 KB | Could not guess the password with 50000 queries. |
8 | Halted | 0 ms | 0 KB | - |