Submission #643114

#TimeUsernameProblemLanguageResultExecution timeMemory
643114TimDeePassword (RMI18_password)C++17
10 / 100
5 ms208 KiB
#include <bits/stdc++.h> using namespace std; int query(string s); string guess(int n, int c) { if (n<=c && c<=26) { string ans(n,'.'); for (char i='a'; i<'a'+c; ++i) { int x=0; for (char j='a'; j<'a'+c; ++j) { if (j==i) continue; string s; s+=i; s+=j; int q=query(s); x+=q-1; } if (x<0) continue; ans[n-1-x]=i; } return ans; } }

Compilation message (stderr)

password.cpp: In function 'std::string guess(int, int)':
password.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
#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...