제출 #278702

#제출 시각아이디문제언어결과실행 시간메모리
278702ElyesChaabouniUnscrambling a Messy Bug (IOI16_messy)C++14
컴파일 에러
0 ms0 KiB
/*#pragma GCC optimize("O3")*/ #include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //#define ordered_set tree<int, null_type,less<int >, rb_tree_tag,tree_order_statistics_node_update> #define eps 1e-9 #define MOD1 998244353 #define MOD2 1000000007 #define INV_10 299473306 #define INF 1000000000 #define PI 3.14159265358979323846 using namespace std; vector<int> restore_permutation(int n, int w, int r) { string s=""; string cu; for(int i = 0; i < n; i++) s+='0'; cu=s; for(int i = 0; i < n; i++) { s[i]='1'; add_element(s); } compile_set(); vector<int>ans(n); bool vu[n]; for(int i = 0; i < n; i++) vu[i]=0; for(int i = 0; i < n; i++) { bool done=0; for(int j = 0; j < n && !done; j++) { if(!vu[j]) { cu[j]='1'; if(check_element(cu)) { vu[j]=1; done=1; ans[j]=i; } else cu[j]='0'; } } } return ans; } /*int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); string s; cin >> s; int k; cin >> k; //vector<int>v; int v[k]; for(int i = 0; i < k; i++) { int x; cin >> x; //v.push_back(x); v[i]=x; } cout << solve_puzzle(s, k, v) << '\n'; }*/ //size

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

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:22:6: error: 'add_element' was not declared in this scope
   22 |      add_element(s);
      |      ^~~~~~~~~~~
messy.cpp:24:5: error: 'compile_set' was not declared in this scope
   24 |     compile_set();
      |     ^~~~~~~~~~~
messy.cpp:37:11: error: 'check_element' was not declared in this scope
   37 |        if(check_element(cu))
      |           ^~~~~~~~~~~~~