Submission #1123146

#TimeUsernameProblemLanguageResultExecution timeMemory
1123146SulAPassword (RMI18_password)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> //#include "gondola.h" //#pragma GCC target("popcnt") using namespace __gnu_pbds; using namespace std; using ordered_set = tree<int, null_type, less_equal<>, rb_tree_tag, tree_order_statistics_node_update>; #define popcount __builtin_popcountll #define all(a) (a).begin(), (a).end() string guess(int n, int s) { string ans; for (int i = 0; i < n; i++) { ans += 'a'; for (char j = 'b'; j < 'a' + s; j++) { string t = ans; ans.pop_back(); ans += j; if (query(t) > query(ans)) swap(ans, t); } } return ans; } //signed main() { // ios::sync_with_stdio(false); // cin.tie(nullptr); // cout.tie(nullptr); // // guess(4, 4); //}

Compilation message (stderr)

password.cpp: In function 'std::string guess(int, int)':
password.cpp:21:17: error: 'query' was not declared in this scope
   21 |             if (query(t) > query(ans))
      |                 ^~~~~