sphinx.cpp:2:5: error: 'vector' does not name a type
2 | vector<int> p;
| ^~~~~~
sphinx.cpp: In constructor 'DSU::DSU(int)':
sphinx.cpp:3:17: error: class 'DSU' does not have any field named 'p'
3 | DSU(int n): p(n) { iota(p.begin(),p.end(),0); }
| ^
sphinx.cpp:3:29: error: 'p' was not declared in this scope
3 | DSU(int n): p(n) { iota(p.begin(),p.end(),0); }
| ^
sphinx.cpp:3:24: error: 'iota' was not declared in this scope
3 | DSU(int n): p(n) { iota(p.begin(),p.end(),0); }
| ^~~~
sphinx.cpp: In member function 'int DSU::find(int)':
sphinx.cpp:4:29: error: 'p' was not declared in this scope
4 | int find(int x){ return p[x]==x?x:p[x]=find(p[x]); }
| ^
sphinx.cpp: In member function 'void DSU::unite(int, int)':
sphinx.cpp:7:18: error: 'p' was not declared in this scope
7 | if(a!=b) p[b]=a;
| ^
sphinx.cpp: At global scope:
sphinx.cpp:11:1: error: 'vector' does not name a type
11 | vector<int> find_colours(int N, vector<int> X, vector<int> Y) {
| ^~~~~~