# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124712 | 2019-07-03T18:30:36 Z | wilwxk | Network (BOI15_net) | C++14 | 13 ms | 12152 KB |
#include <bits/stdc++.h> using namespace std; const int MAXN=5e5+5; vector<int> g[MAXN]; int n; int main() { scanf("%d", &n); for(int i=1; i<=n-1; i++) { int a, b; scanf("%d %d", &a, &b); g[a].push_back(b); g[b].push_back(a); } int cont=0; for(int i=1; i<=n; i++) if(g[i].size()==1) cont++; printf("%d\n", (cont+1)/2); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 12152 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 12152 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 12152 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |