rect.cpp:8:16: error: wrong number of template arguments (1, should be 2)
8 | vector<pair<int> > p[2];
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from rect.h:5,
from rect.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
rect.cpp:8:18: error: template argument 1 is invalid
8 | vector<pair<int> > p[2];
| ^
rect.cpp:8:18: error: template argument 2 is invalid
rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:33:20: error: request for member 'clear' in 'p[t]', which is of non-class type 'int'
33 | p[t].clear();
| ^~~~~
rect.cpp:39:28: error: request for member 'push_back' in 'p[t]', which is of non-class type 'int'
39 | p[t].push_back({j - c, cnt[t][c][j + 1]});
| ^~~~~~~~~
rect.cpp:40:39: error: request for member 'back' in 'p[t]', which is of non-class type 'int'
40 | if(t) swap(p[t].back().first, p[t].back().second);
| ^~~~
rect.cpp:40:58: error: request for member 'back' in 'p[t]', which is of non-class type 'int'
40 | if(t) swap(p[t].back().first, p[t].back().second);
| ^~~~
rect.cpp:48:25: error: request for member 'begin' in 'p[t]', which is of non-class type 'int'
48 | sort(p[t].begin(), p[t].end(), greater<pair<int, int> >());
| ^~~~~
rect.cpp:48:39: error: request for member 'end' in 'p[t]', which is of non-class type 'int'
48 | sort(p[t].begin(), p[t].end(), greater<pair<int, int> >());
| ^~~
rect.cpp:51:37: error: 'begin' was not declared in this scope
51 | for(pair<int, int> v : p[0]){
| ^
rect.cpp:51:37: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from rect.cpp:2:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from rect.cpp:2:
/usr/include/c++/10/bits/fs_dir.h:549:3: note: 'std::filesystem::__cxx11::begin'
549 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
rect.cpp:51:37: error: 'end' was not declared in this scope
51 | for(pair<int, int> v : p[0]){
| ^
rect.cpp:51:37: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from rect.cpp:2:
/usr/include/c++/10/valarray:1244:5: note: 'std::end'
1244 | end(const valarray<_Tp>& __va)
| ^~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from rect.cpp:2:
/usr/include/c++/10/bits/fs_dir.h:554:3: note: 'std::filesystem::__cxx11::end'
554 | end(recursive_directory_iterator) noexcept
| ^~~
rect.cpp:52:31: error: request for member 'size' in 'p[1]', which is of non-class type 'int'
52 | for(; it < p[1].size() && v.f <= p[1][it].first; it++) upd(p[1][it].second, 1);
| ^~~~
rect.cpp:52:43: error: 'struct std::pair<int, int>' has no member named 'f'
52 | for(; it < p[1].size() && v.f <= p[1][it].first; it++) upd(p[1][it].second, 1);
| ^
rect.cpp:52:52: error: invalid types 'int[int]' for array subscript
52 | for(; it < p[1].size() && v.f <= p[1][it].first; it++) upd(p[1][it].second, 1);
| ^
rect.cpp:52:78: error: invalid types 'int[int]' for array subscript
52 | for(; it < p[1].size() && v.f <= p[1][it].first; it++) upd(p[1][it].second, 1);
| ^
rect.cpp:55:50: error: invalid types 'int[int]' for array subscript
55 | for(int jt = 0; jt < it; jt++) upd(p[1][jt].second, -1);
| ^