Problem treecutting
User FIips
Submission Time 2026-03-11 23:52:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

treecutting.cpp:8:10: error: ‘MAX’ was not declared in this scope
8 | int dist[MAX];
| ^~~
treecutting.cpp:9:17: error: ‘MAX’ was not declared in this scope
9 | vector<int> adj[MAX];
| ^~~
treecutting.cpp: In function ‘void dfs(long long int)’:
treecutting.cpp:13:15: error: ‘adj’ was not declared in this scope
13 | for(int it : adj[p]) {
| ^~~
treecutting.cpp:14:6: error: ‘dist’ was not declared in this scope; did you mean ‘it’?
14 | if(dist[p] + 1 < dist[it]) {
| ^~~~
| it
treecutting.cpp: In function ‘int32_t main()’:
treecutting.cpp:26:7: error: ‘dist’ was not declared in this scope
26 | fill(dist, dist + n + 1, inf);
| ^~~~
treecutting.cpp:26:27: error: ‘inf’ was not declared in this scope; did you mean ‘ynf’?
26 | fill(dist, dist + n + 1, inf);
| ^~~
|