제출 #1013887

#제출 시각아이디문제언어결과실행 시간메모리
1013887Almonther새로운 문제 (POI13_luk)C++98
0 / 100
96 ms35672 KiB
#include <bits/stdc++.h> #define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define co cout<< //#pragma GCC optimize("O3,Ofast,unroll-loops") //#pragma GCC target("avx2,sse3,sse4,avx") using namespace std; //stuff ll n; vector<ll>v[1000001]; void solve(){ cin>>n; for(int i=0;i<n-1;i++){ ll a,b; cin>>a>>b; v[a].push_back(b); v[b].push_back(a); } ll mx=0; for(int i=1;i<=n;i++){ mx=max(mx,(ll)v[i].size()+((i!=1)?-1:0)); } co mx; } int main() { suiii int tt=1; // cin>>tt; while(tt--){ solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...