fancyfence.cpp:5:13: error: 'll' was not declared in this scope
5 | #define int ll
| ^~
fancyfence.cpp:6:19: note: in expansion of macro 'int'
6 | using vi = vector<int>;
| ^~~
fancyfence.cpp:6:22: error: template argument 1 is invalid
6 | using vi = vector<int>;
| ^
fancyfence.cpp:6:22: error: template argument 2 is invalid
fancyfence.cpp:5:13: error: 'll' was not declared in this scope
5 | #define int ll
| ^~
fancyfence.cpp:7:17: note: in expansion of macro 'int'
7 | using ii = pair<int, int>;
| ^~~
fancyfence.cpp:5:13: error: 'll' was not declared in this scope
5 | #define int ll
| ^~
fancyfence.cpp:7:22: note: in expansion of macro 'int'
7 | using ii = pair<int, int>;
| ^~~
fancyfence.cpp:7:25: error: template argument 1 is invalid
7 | using ii = pair<int, int>;
| ^
fancyfence.cpp:7:25: error: template argument 2 is invalid
fancyfence.cpp:15:5: error: 'vi' does not name a type
15 | vi e, s;
| ^~
fancyfence.cpp:16:22: error: 'vi' does not name a type
16 | DSU(int n, const vi &S0) : e(n, -1), s(S0) {}
| ^~
fancyfence.cpp: In constructor 'DSU::DSU(ll, const int&)':
fancyfence.cpp:16:32: error: class 'DSU' does not have any field named 'e'
16 | DSU(int n, const vi &S0) : e(n, -1), s(S0) {}
| ^
fancyfence.cpp:16:42: error: class 'DSU' does not have any field named 's'
16 | DSU(int n, const vi &S0) : e(n, -1), s(S0) {}
| ^
fancyfence.cpp: In member function 'll DSU::repr(ll)':
fancyfence.cpp:19:15: error: 'e' was not declared in this scope; did you mean 're'?
19 | while(e[u] >= 0) u = e[u];
| ^
| re
fancyfence.cpp: In member function 'void DSU::join(ll, ll)':
fancyfence.cpp:27:12: error: 'e' was not declared in this scope; did you mean 're'?
27 | if(e[u] > e[v]) swap(u, v);
| ^
| re
fancyfence.cpp:28:9: error: 'e' was not declared in this scope; did you mean 're'?
28 | e[u] += e[v];
| ^
| re
fancyfence.cpp:30:26: error: 's' was not declared in this scope
30 | re = (re - 1ll * s[u] * (s[u] + 1) % MOD * int(5e8 + 4) % MOD) % MOD;
| ^
fancyfence.cpp: In function 'int main()':
fancyfence.cpp:42:5: error: 'vi' was not declared in this scope
42 | vi W(n);
| ^~
fancyfence.cpp:43:12: error: 'ii' was not declared in this scope
43 | vector<ii> H(n);
| ^~
fancyfence.cpp:43:14: error: template argument 1 is invalid
43 | vector<ii> H(n);
| ^
fancyfence.cpp:43:14: error: template argument 2 is invalid
fancyfence.cpp:45:17: error: invalid types 'int[ll {aka long long int}]' for array subscript
45 | cin >> H[i].first;
| ^
fancyfence.cpp:46:10: error: invalid types 'int[ll {aka long long int}]' for array subscript
46 | H[i].second = i;
| ^
fancyfence.cpp:49:16: error: 'W' was not declared in this scope
49 | cin >> W[i];
| ^
fancyfence.cpp:50:16: error: 'W' was not declared in this scope
50 | DSU Sol(n, W);
| ^
fancyfence.cpp:51:7: error: expected ';' before 'on'
51 | vi on(n, 0);
| ^~~
| ;
fancyfence.cpp:52:12: error: request for member 'begin' in 'H', which is of non-class type 'int'
52 | sort(H.begin(), H.end());
| ^~~~~
fancyfence.cpp:52:23: error: request for member 'end' in 'H', which is of non-class type 'int'
52 | sort(H.begin(), H.end());
| ^~~
fancyfence.cpp:59:22: error: invalid types 'int[ll {aka long long int}]' for array subscript
59 | int p = H[dr].second;
| ^
fancyfence.cpp:60:13: error: 'on' was not declared in this scope; did you mean 'n'?
60 | on[p] = 1;
| ^~
| n
fancyfence.cpp:64:28: error: invalid types 'int[ll {aka long long int}]' for array subscript
64 | } while(dr < n && H[dr].first == H[dr - 1].first);
| ^
fancyfence.cpp:64:43: error: invalid types 'int[ll {aka long long int}]' for array subscript
64 | } while(dr < n && H[dr].first == H[dr - 1].first);
| ^
fancyfence.cpp:65:40: error: invalid types 'int[ll {aka long long int}]' for array subscript
65 | ll cur = (s + Sol.re) % MOD * H[i].first % MOD;
| ^
fancyfence.cpp:54:16: warning: unused variable 'hant' [-Wunused-variable]
54 | ll re = 0, hant = 0;
| ^~~~