Submission #1117329

#TimeUsernameProblemLanguageResultExecution timeMemory
1117329somefolkPassword (RMI18_password)C++14
10 / 100
9 ms336 KiB
#include <iostream> #include <cmath> #include <algorithm> #include <string> #include <vector> #include <map> #include <unordered_map> #include <queue> #include <set> #include <unordered_set> #include <complex> #include <list> #include <chrono> #include <random> #include <stack> #include <iomanip> #include <fstream> using namespace std; #define endl "\n" // #define int long long const int INF = 2 * 1e5 + 5; const int MOD = 1e9 + 7; int query(string s); string guess(int n, int s){ vector<char> a; for(char i = 0; i < s; i++){ if(query(string(1, i+'a'))) a.push_back(i+'a'); } map<char, int> pass; for(int i = 0; i < (int)a.size(); i++){ int l = 0; for(int j = 0; j < (int)a.size(); j++){ if(a[i] == a[j]) continue; if(query(string(1,a[i])+a[j]) == 1) l++; } pass[a[i]] = l; } map<int, char> sol; for(auto &i : pass){ sol[i.second] = i.first; } string sol1; for(auto &i : sol){ sol1+=i.second; } return sol1; }
#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...