# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
755994 | 2023-06-10T19:44:27 Z | vjudge1 | Password (RMI18_password) | C++17 | 376 ms | 452 KB |
#include<bits/stdc++.h> using namespace std; int query(string s); string guess(int n,int s){ string ans=""; for(int j=0;j<s;j++){ bool f=1; char cur=(char)(j+'a'); for(int k=0;k<ans.size();k++){ string temp=ans; //cout<<ans<<" "<<" "<<k<<" "<<temp<<endl; if(ans.size()==n){ return ans; } temp.insert(temp.begin()+k,cur); if(query(temp)==temp.size()){ ans=temp; } } while(f&&ans.size()<n){ f=0; string temp=ans; temp.push_back(cur); if(query(temp)==temp.size()){ ans=temp; f=1; } } } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 4 ms | 208 KB | Guessed the password with 294 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 166 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 46 ms | 312 KB | Guessed the password with 4807 queries. |
2 | Correct | 109 ms | 312 KB | Guessed the password with 10754 queries. |
3 | Correct | 150 ms | 328 KB | Guessed the password with 14365 queries. |
4 | Correct | 218 ms | 452 KB | Guessed the password with 20878 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 4 ms | 208 KB | Guessed the password with 294 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
4 | Correct | 3 ms | 208 KB | Guessed the password with 166 queries. |
5 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
6 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
7 | Correct | 46 ms | 312 KB | Guessed the password with 4807 queries. |
8 | Correct | 109 ms | 312 KB | Guessed the password with 10754 queries. |
9 | Correct | 150 ms | 328 KB | Guessed the password with 14365 queries. |
10 | Correct | 218 ms | 452 KB | Guessed the password with 20878 queries. |
11 | Incorrect | 376 ms | 328 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 4 ms | 208 KB | Guessed the password with 294 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
4 | Correct | 3 ms | 208 KB | Guessed the password with 166 queries. |
5 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
6 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
7 | Correct | 46 ms | 312 KB | Guessed the password with 4807 queries. |
8 | Correct | 109 ms | 312 KB | Guessed the password with 10754 queries. |
9 | Correct | 150 ms | 328 KB | Guessed the password with 14365 queries. |
10 | Correct | 218 ms | 452 KB | Guessed the password with 20878 queries. |
11 | Incorrect | 376 ms | 328 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |