제출 #1136122

#제출 시각아이디문제언어결과실행 시간메모리
1136122lopkusPassword (RMI18_password)C++20
20 / 100
49 ms492 KiB
#include <bits/stdc++.h> using namespace std; int query(string str); string guess(int n, int sz1){ vector<char> ans; int current = 0; for(int i = 0; i < sz1; i++) { char x = (char)((int)'a' + i); int ok = 0; for(int j = 0; j <= ans.size(); j++) { vector<char> v = ans; v.insert(v.begin() + j, x); string s = ""; for(auto it : v) { s += it; } if(query(s) == current + 1) { ans = v; current += 1; if(current == n) { ok = 1; break; } } } if(ok) { break; } } string e = ""; for(auto it : ans) { e += it; } return e; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...