prog.cpp:2:1: error: ‘vii’ does not name a type; did you mean ‘void’?
vii v[N];
^~~
void
prog.cpp: In function ‘void dfs(int, int)’:
prog.cpp:11:18: error: ‘v’ was not declared in this scope
for (auto &i : v[node]) {
^
prog.cpp: In function ‘int power(int, int)’:
prog.cpp:20:10: error: ‘mod’ was not declared in this scope
r %= mod;
^~~
prog.cpp: At global scope:
prog.cpp:28:26: error: ‘set’ has not been declared
void dfss(int u, int pr, set<int>&s) {
^~~
prog.cpp:28:29: error: expected ‘,’ or ‘...’ before ‘<’ token
void dfss(int u, int pr, set<int>&s) {
^
prog.cpp: In function ‘void dfss(int, int, int)’:
prog.cpp:30:18: error: ‘v’ was not declared in this scope
for (auto &i : v[u]) {
^
prog.cpp:31:21: error: ‘s’ was not declared in this scope
if (i ^ pr and !s.count(i)) {
^
prog.cpp: In function ‘void solve()’:
prog.cpp:41:3: error: ‘cin’ was not declared in this scope
cin >> n >> q;
^~~
prog.cpp:44:6: error: ‘i’ was not declared in this scope
fo(i, 1, n) p[i] = (p[i - 1] * 2LL) % mod;
^
prog.cpp:44:3: error: ‘fo’ was not declared in this scope
fo(i, 1, n) p[i] = (p[i - 1] * 2LL) % mod;
^~
prog.cpp:57:5: error: ‘set’ was not declared in this scope
set<int>s;
^~~
prog.cpp:57:9: error: expected primary-expression before ‘int’
set<int>s;
^~~
prog.cpp:59:7: error: ‘s’ was not declared in this scope
s.insert(y);
^
prog.cpp:62:5: error: ‘s’ was not declared in this scope
s.insert(x);
^
prog.cpp:70:5: error: ‘cout’ was not declared in this scope
cout << ans << endl;
^~~~
prog.cpp:70:20: error: ‘endl’ was not declared in this scope
cout << ans << endl;
^~~~
prog.cpp:70:20: note: suggested alternative: ‘enum’
cout << ans << endl;
^~~~
enum