Problem cowland
User awesomeyy22
Submission Time 2023-03-29 16:10:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cowland.cpp:1:1: error: ‘vector’ does not name a type
1 | vector<int> adj[100005];
| ^~~~~~
cowland.cpp: In function ‘int dfs(int)’:
cowland.cpp:7:12: error: ‘adj’ was not declared in this scope
7 | for(int i:adj[x]){
| ^~~
cowland.cpp: In function ‘void decomp(int, int)’:
cowland.cpp:27:12: error: ‘adj’ was not declared in this scope
27 | for(int i:adj[x]){
| ^~~
cowland.cpp: At global scope:
cowland.cpp:35:1: error: expected unqualified-id before ‘for’
35 | for(;head[a]!=head[b];b=par[head[b]]){
| ^~~
cowland.cpp:35:6: error: ‘head’ does not name a type
35 | for(;head[a]!=head[b];b=par[head[b]]){
| ^~~~
cowland.cpp:35:23: error: ‘b’ does not name a type
35 | for(;head[a]!=head[b];b=par[head[b]]){
| ^
cowland.cpp:39:1: error: expected unqualified-id before ‘if’
39 | if(dep[a]>dep[b]) swap(a,b);