Main.cpp: In function 'int main()':
Main.cpp:21:32: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ff'
21 | while (j < n && all[i].ff == all[j].ff) j++;
| ^~
Main.cpp:21:45: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ff'
21 | while (j < n && all[i].ff == all[j].ff) j++;
| ^~
Main.cpp:29:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | while (i < all.size()){
| ~~^~~~~~~~~~~~
Main.cpp:31:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | while (j < all.size() && all[i].first == all[j].first) j++;
| ~~^~~~~~~~~~~~
Main.cpp:32:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
32 | tmp.pb({all[i].ss, all[i].ff});
| ^~
Main.cpp:32:24: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ss'
32 | tmp.pb({all[i].ss, all[i].ff});
| ^~
Main.cpp:32:35: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ff'
32 | tmp.pb({all[i].ss, all[i].ff});
| ^~
Main.cpp:41:19: error: 'pii' was not declared in this scope
41 | vector<vector<pii>> sp(n, vector<pii>(lg + 1));
| ^~~
Main.cpp:41:19: error: template argument 1 is invalid
Main.cpp:41:19: error: template argument 2 is invalid
Main.cpp:41:22: error: template argument 1 is invalid
41 | vector<vector<pii>> sp(n, vector<pii>(lg + 1));
| ^~
Main.cpp:41:22: error: template argument 2 is invalid
Main.cpp:41:41: error: template argument 2 is invalid
41 | vector<vector<pii>> sp(n, vector<pii>(lg + 1));
| ^
Main.cpp:41:50: error: expression list treated as compound expression in initializer [-fpermissive]
41 | vector<vector<pii>> sp(n, vector<pii>(lg + 1));
| ^
Main.cpp:42:35: error: invalid types 'int[int]' for array subscript
42 | for (int i = 0; i < n; i++) sp[i][0] = {all[i].ss, i};
| ^
Main.cpp:42:52: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ss'
42 | for (int i = 0; i < n; i++) sp[i][0] = {all[i].ss, i};
| ^~
Main.cpp:45:15: error: invalid types 'int[int]' for array subscript
45 | sp[i][k] = max(sp[i][k - 1], sp[i + (1 << (k - 1))][k - 1]);
| ^
Main.cpp:45:30: error: invalid types 'int[int]' for array subscript
45 | sp[i][k] = max(sp[i][k - 1], sp[i + (1 << (k - 1))][k - 1]);
| ^
Main.cpp:45:44: error: invalid types 'int[int]' for array subscript
45 | sp[i][k] = max(sp[i][k - 1], sp[i + (1 << (k - 1))][k - 1]);
| ^
Main.cpp: In lambda function:
Main.cpp:48:22: error: invalid types 'int[int]' for array subscript
48 | return max(sp[l][k], sp[r - (1 << k) + 1][k]);
| ^
Main.cpp:48:32: error: invalid types 'int[int]' for array subscript
48 | return max(sp[l][k], sp[r - (1 << k) + 1][k]);
| ^
Main.cpp: In function 'int main()':
Main.cpp:51:36: error: 'class std::vector<int>' has no member named 'pb'
51 | for (int i = 0; i < n; i++) ls.pb(all[i].ff);
| ^~
Main.cpp:51:46: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ff'
51 | for (int i = 0; i < n; i++) ls.pb(all[i].ff);
| ^~
Main.cpp:67:41: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ff'
67 | int j = i, cnt = 1, rr = all[i].ff + m - 1;
| ^~
Main.cpp:68:34: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'ss'
68 | while (j != -1 && all[j].ss < rr){
| ^~