제출 #331234

#제출 시각아이디문제언어결과실행 시간메모리
331234PetiPassword (RMI18_password)C++14
30 / 100
631 ms384 KiB
#include <iostream> #include <vector> using namespace std; int query(string str); string guess(int n, int s){ vector<int> db(26, 0); for(int i = 0; i < s; i++){ char c = (char)((int)'a' + i); string q; q.assign(n, c); db[i] = query(q); } string pass; pass.assign(db[0], 'a'); for(int i = 1; i < s; i++){ char c = (char)((int)('a' + i)); for(int j = 0; j < db[i]; j++){ int x = 0; while(1){ string q = pass; q.insert(q.begin() + x, c); if(query(q) == (int)q.size()){ pass = q; break; } x++; } } } return pass; }
#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...