제출 #147463

#제출 시각아이디문제언어결과실행 시간메모리
147463mosiashvililukaSplit the Attractions (IOI19_split)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int z,x,d,e,ka[10],zx; vector <int> pas,v[100009]; bool bo[100009]; void dfs(int w){ if(ka[zx]==0) return; bo[w]=1; pas[w]=zx; ka[zx]--; if(ka[zx]==0) return; for(vector <int>::iterator it=v[w].begin(); it!=v[w].end(); it++){ if(bo[(*it)]==1) continue; dfs((*it)); if(ka[zx]==0) return; } } vector <int> find_split(int n, int a, int b, int c, vector <int> p, vector <int> q){ pas.resize(n); ka[1]=a; ka[2]=b; ka[3]=c; zx=0; m=p.size(); for(int h=0; h<m; h++){ v[p[h]].push_back(q[h]); v[q[h]].push_back(p[h]); } for(int h=1; h<=a; h++){ if(bo[h]==0){ zx++; dfs(h); } } return pas; }

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

split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:24:2: error: 'm' was not declared in this scope
  m=p.size();
  ^