# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
709075 | 2023-03-13T05:57:20 Z | jamezzz | Password (RMI18_password) | C++17 | 189 ms | 356 KB |
#include <bits/stdc++.h> using namespace std; int query(string str); string guess(int n,int s){ string ans=""; int pv=0; for(int i=0;i<s;++i){ char c='a'+i; for(int j=0;j<ans.length();++j){ string tmp=ans; tmp.insert(j,1,c); int res=query(tmp); if(res>pv){ pv=res; swap(tmp,ans); if(pv==n)return ans; continue; } } string tmp=ans; tmp.insert(tmp.length(),n-tmp.length(),c); pv=query(tmp); tmp.resize(pv); swap(ans,tmp); if(pv==n)return ans; } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 130 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 290 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 47 queries. |
2 | Runtime error | 1 ms | 300 KB | Execution killed with signal 13 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 41 ms | 352 KB | Guessed the password with 4737 queries. |
2 | Correct | 98 ms | 348 KB | Guessed the password with 10641 queries. |
3 | Correct | 129 ms | 356 KB | Guessed the password with 14308 queries. |
4 | Correct | 189 ms | 356 KB | Guessed the password with 20788 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 130 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 290 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 47 queries. |
4 | Runtime error | 1 ms | 300 KB | Execution killed with signal 13 |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 130 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 290 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 47 queries. |
4 | Runtime error | 1 ms | 300 KB | Execution killed with signal 13 |
5 | Halted | 0 ms | 0 KB | - |