mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 21:56:28 +00:00
16 lines
259 B
C++
16 lines
259 B
C++
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int n, u, v, deg[100005], ans;
|
||
|
|
||
|
int main() {
|
||
|
cin >> n;
|
||
|
for (int i = 1; i < n; i++) {
|
||
|
cin >> u >> v;
|
||
|
ans = max({ans, ++deg[u], ++deg[v]});
|
||
|
}
|
||
|
cout << ++ans << endl;
|
||
|
return 0;
|
||
|
}
|