Problem general
User dzuizz
Submission Time 2025-09-03 11:54:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

general.cpp:5:3: error: ‘vector’ does not name a type
5 | vector<int> pa,power;
| ^~~~~~
general.cpp: In function ‘void dsu::init(long long int, long long int*)’:
general.cpp:9:5: error: ‘pa’ was not declared in this scope
9 | pa.resize(n);
| ^~
general.cpp:10:5: error: ‘power’ was not declared in this scope
10 | power.resize(n);
| ^~~~~
general.cpp: In function ‘long long int dsu::f(long long int)’:
general.cpp:13:27: error: ‘pa’ was not declared in this scope
13 | int f(int x){ return x==pa[x]?x:pa[x]=f(pa[x]); }
| ^~
general.cpp: In function ‘long long int dsu::m(long long int, long long int)’:
general.cpp:17:8: error: ‘power’ was not declared in this scope
17 | if(power[b]>power[a]) swap(a,b);
| ^~~~~
general.cpp:18:5: error: ‘pa’ was not declared in this scope; did you mean ‘a’?
18 | pa[b]=a;
|