Submission #590861

#TimeUsernameProblemLanguageResultExecution timeMemory
590861Sam_a17Unscrambling a Messy Bug (IOI16_messy)C++14
Compilation error
0 ms0 KiB
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <cstdio> // #include "" using namespace std; #define ll long long #define ld long double #define all(x) (x.begin(), x.end()) #define rall(x) (x.rbegin(), x.rend()) #define sz(x) (int)x.size() vector<int> restore_permutation(int n, int w, int r) { string s(n, '0'); // cout << s << endl; for(int i = 0; i < n; i++) { s[i] = '1'; // cout << s << endl; add_element(s); } compile_set(); string si(n, '0'); vector<int> answ(n, -1); for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(answ[j] != -1) continue; si[j] = '1'; if(check_element(si)) { answ[i] = j; continue; } si[i] = '0'; } } return answ; }

Compilation message (stderr)

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:21:7: error: 'add_element' was not declared in this scope
   21 |       add_element(s);
      |       ^~~~~~~~~~~
messy.cpp:24:5: error: 'compile_set' was not declared in this scope
   24 |     compile_set();
      |     ^~~~~~~~~~~
messy.cpp:33:12: error: 'check_element' was not declared in this scope
   33 |         if(check_element(si)) {
      |            ^~~~~~~~~~~~~