net.cpp: In function 'void dfs(int, int)':
net.cpp:23:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(!found) leaf.pb(u);p
^~
net.cpp:23:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if(!found) leaf.pb(u);p
^
net.cpp:24:1: error: expected ';' before '}' token
}
^
net.cpp:24:1: warning: statement has no effect [-Wunused-value]
net.cpp: In function 'int main()':
net.cpp:37:37: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", (leaf.size()+1)/2);
~~~~~~~~~~~~~~~~~^
net.cpp:28:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int n; scanf("%d", &n);
~~~~~^~~~~~~~~~
net.cpp:31:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int u, v; scanf("%d %d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~~