# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
709208 | 2023-03-13T08:20:06 Z | beepbeepsheep | Password (RMI18_password) | C++17 | 1706 ms | 118056 KB |
#include <bits/stdc++.h> using namespace std; int arr[26]; int query(string s); string build(string s, char c, int pos){ string ret=""; for (int i=0;i<pos;i++){ ret+=s[i]; } ret+=c; for (int i=pos;i<s.size();i++){ ret+=s[i]; } return ret; } string mrg(string a, string b){ if (a.size()>b.size()) swap(a,b); if (a=="") return b; string ans=b; int l=0,r=ans.size()+1,m; for (int i=0;i<a.size();i++){ for (int m=l;m<=ans.size()+1;m++){ string test=build(ans,a[i],m); int res=query(test); if (res==test.length()){ l=m; ans=build(ans,a[i],m); break; } cerr<<ans<<endl; } } return ans; } string dup(char c, int n){ string ret=""; for (int i=0;i<n;i++) ret+=c; return ret; } string guess(int n, int s){ for (int i=0;i<s;i++){ arr[i]=query(dup(i+'a',n)); } string ans=""; for (int i=0;i<s;i++){ ans=mrg(ans,dup(i+'a',arr[i])); } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 75 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 188 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 72 queries. |
2 | Correct | 2 ms | 208 KB | Guessed the password with 135 queries. |
3 | Correct | 2 ms | 208 KB | Guessed the password with 115 queries. |
4 | Correct | 5 ms | 208 KB | Guessed the password with 268 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 95 ms | 3164 KB | Guessed the password with 5277 queries. |
2 | Correct | 196 ms | 9344 KB | Guessed the password with 11372 queries. |
3 | Correct | 297 ms | 13292 KB | Guessed the password with 13732 queries. |
4 | Correct | 452 ms | 26412 KB | Guessed the password with 22278 queries. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 75 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 188 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 72 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 135 queries. |
5 | Correct | 2 ms | 208 KB | Guessed the password with 115 queries. |
6 | Correct | 5 ms | 208 KB | Guessed the password with 268 queries. |
7 | Correct | 95 ms | 3164 KB | Guessed the password with 5277 queries. |
8 | Correct | 196 ms | 9344 KB | Guessed the password with 11372 queries. |
9 | Correct | 297 ms | 13292 KB | Guessed the password with 13732 queries. |
10 | Correct | 452 ms | 26412 KB | Guessed the password with 22278 queries. |
11 | Execution timed out | 1706 ms | 118056 KB | Time limit exceeded (wall clock) |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 75 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 188 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 72 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 135 queries. |
5 | Correct | 2 ms | 208 KB | Guessed the password with 115 queries. |
6 | Correct | 5 ms | 208 KB | Guessed the password with 268 queries. |
7 | Correct | 95 ms | 3164 KB | Guessed the password with 5277 queries. |
8 | Correct | 196 ms | 9344 KB | Guessed the password with 11372 queries. |
9 | Correct | 297 ms | 13292 KB | Guessed the password with 13732 queries. |
10 | Correct | 452 ms | 26412 KB | Guessed the password with 22278 queries. |
11 | Execution timed out | 1706 ms | 118056 KB | Time limit exceeded (wall clock) |
12 | Halted | 0 ms | 0 KB | - |