secret.cpp:5:10: error: 'vector' was not declared in this scope
5 | vector<vector<T>> mat;
| ^~~~~~
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:10: error: 'vector' was not declared in this scope
secret.cpp:5:3: error: 'vector' does not name a type
5 | vector<vector<T>> mat;
| ^~~~~~
secret.cpp:8:29: error: 'vector' does not name a type
8 | DisjointSparseTable(const vector<T>& a, const F& f) : n(int(a.size())), func(f) {
| ^~~~~~
secret.cpp:8:35: error: expected ',' or '...' before '<' token
8 | DisjointSparseTable(const vector<T>& a, const F& f) : n(int(a.size())), func(f) {
| ^
secret.cpp: In constructor 'DisjointSparseTable<T, F>::DisjointSparseTable(int)':
secret.cpp:8:63: error: 'a' was not declared in this scope
8 | DisjointSparseTable(const vector<T>& a, const F& f) : n(int(a.size())), func(f) {
| ^
secret.cpp:8:80: error: 'f' was not declared in this scope
8 | DisjointSparseTable(const vector<T>& a, const F& f) : n(int(a.size())), func(f) {
| ^
secret.cpp:9:5: error: 'mat' was not declared in this scope
9 | mat.push_back(a);
| ^~~
secret.cpp:18:35: error: there are no arguments to 'min' that depend on a template parameter, so a declaration of 'min' must be available [-fpermissive]
18 | for (int j = mid + 1; j < min(n, mid + (1 << p)); j++) {
| ^~~
secret.cpp:18:35: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
secret.cpp: In member function 'T DisjointSparseTable<T, F>::Query(int, int) const':
secret.cpp:26:5: error: there are no arguments to 'assert' that depend on a template parameter, so a declaration of 'assert' must be available [-fpermissive]
26 | assert(0 <= l && l < r && r <= n);
| ^~~~~~
secret.cpp:28:14: error: 'mat' was not declared in this scope
28 | return mat[0][l];
| ^~~
secret.cpp:30:13: error: there are no arguments to 'bit_width' that depend on a template parameter, so a declaration of 'bit_width' must be available [-fpermissive]
30 | int p = bit_width(unsigned(l ^ (r - 1))) - 1;
| ^~~~~~~~~
secret.cpp:31:17: error: 'mat' was not declared in this scope
31 | return func(mat[p][l], mat[p][r - 1]);
| ^~~