제출 #147563

#제출 시각아이디문제언어결과실행 시간메모리
147563AKaan37Split the Attractions (IOI19_split)C++17
컴파일 에러
0 ms0 KiB
//Sani buyuk Osman Pasa Plevneden cikmam diyor. //FatihSultanMehmedHan //Abdulhamid Han //Bismillahirrahmanirrahim //█▀█─█──█──█▀█─█─█ //█▄█─█──█──█▄█─█▄█ //█─█─█▄─█▄─█─█─█─█ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> #include "split.h" using namespace std; typedef long long lo; typedef pair< int,int > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(int i=1;i<=n;i++) #define mid ((start+end)/2) #define ort ((bas+son)/2) const lo MAX = -1000000000000000000; const lo MIN = 1000000000000000000; const lo inf = 1000000000; const lo KOK = 100000; const lo LOG = 30; const lo li = 500005; const lo mod = 1000000007; int m,bb,k,flag,t; int cev; string s; vector<int> v[li]; vector<int> vv; inline void dfs(int node,int der){ if(vis[node]==1)return ; if(der==bb)return ; vis[node]=1; v.pb(node); for(int i=0;i<(int)v[node].size();i++){ int go=v[node][i]; dfs(go,der+1); } } vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) { bb=b; for(int i=0;i<(int)p.size();i++){ v[q[i]].pb(p[i]); v[p[i]].pb(q[i]); } dfs(1,0); for(int i=0;i<n;i++){ if(vis[i]==1){vv.pb(2);} else if(flag==0){flag=1;vv.pb(1);} else vv.pb(3); } return vv; } //~ int main(){ //~ return 0; //~ }

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

split.cpp: In function 'void dfs(int, int)':
split.cpp:44:5: error: 'vis' was not declared in this scope
  if(vis[node]==1)return ;
     ^~~
split.cpp:46:2: error: 'vis' was not declared in this scope
  vis[node]=1;
  ^~~
split.cpp:23:12: error: request for member 'push_back' in 'v', which is of non-class type 'std::vector<int> [500005]'
 #define pb push_back
            ^
split.cpp:47:4: note: in expansion of macro 'pb'
  v.pb(node);
    ^~
split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:62:6: error: 'vis' was not declared in this scope
   if(vis[i]==1){vv.pb(2);}
      ^~~