Submission #1143260

#TimeUsernameProblemLanguageResultExecution timeMemory
1143260Stormtrooper007Triumphal arch (POI13_luk)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<int>adj[300001]; int depth[300001]; int f[300001]; int ans=0; void dfs(int x,int p) { if(p!=-1) { depth[x]=depth[p]+1; } for(int i=0;i<adj[x].size();i++) { if(adj[x][i]!=p) { dfs(adj[x][i],x); } } } int main() { int n; cin>>n; for(int i=0;i<n-1;i++) { int a,b; cin>>a>>b; adj[a].push_back(b); adj[b].push_back(a); } dfs(1,-1); for(int i=2;i<=n;i++) { f[depth[i]]++; //cout<<depth[i]<<'\n'; ans=max(ans,f[depth[i]]); } cout<<ans<<'\n'; return 0; }

Compilation message (stderr)

luk.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.