제출 #50865

#제출 시각아이디문제언어결과실행 시간메모리
50865zetapiUnscrambling a Messy Bug (IOI16_messy)C++14
컴파일 에러
0 ms0 KiB
//#include "messy.h" #include "bits/stdc++.h" using namespace std; #define pb push_back const int MAX=1e5; vector<int> restore_permutation(int n, int w, int r) { /*add_element("0"); compile_set(); check_element("0");*/ string X=""; vector<int> res; for(int A=0;A<32;A++) res.pb(A); for(int A=0;A<32;A++) X+="0"; for(int A=0;A<32;A++) { X[A]='1'; add_element(X); } compile_set(); for(int A=0;A<32;A++) X[A]='0'; for(int A=0;A<32;A++) { for(int B=0;B<32;B++) { if(X[B]=='1') continue; X[B]='1'; if(check_element(X)) res[A]=B; X[B]='0'; } X[res[A]]='1'; } return res; }

컴파일 시 표준 에러 (stderr) 메시지

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:24:6: error: 'add_element' was not declared in this scope
      add_element(X);
      ^~~~~~~~~~~
messy.cpp:26:5: error: 'compile_set' was not declared in this scope
     compile_set();
     ^~~~~~~~~~~
messy.cpp:36:10: error: 'check_element' was not declared in this scope
       if(check_element(X))
          ^~~~~~~~~~~~~