net.cpp: In function 'void dfs(int, int)':
net.cpp:12:9: error: 'sz' was not declared in this scope
sz[x] += sz[it];
^
net.cpp: In function 'int main()':
net.cpp:28:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<ans.size(); i+=2) printf("%d %d\n", ans[i], ans[i+1]);
^
net.cpp:18:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
^
net.cpp:20:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x, &y);
^