election.cpp: In function 'void upd(int, int)':
election.cpp:37:6: warning: statement has no effect [-Wunused-value]
37 | for(id; id >= 1; id -= id & (-id)) t[id] += val;
| ^~
election.cpp: In function 'int get(int)':
election.cpp:41:6: warning: statement has no effect [-Wunused-value]
41 | for(id; id <= n; id += id & (-id)) ans += t[id];
| ^~
election.cpp: In function 'void UPD(int, int)':
election.cpp:45:6: warning: statement has no effect [-Wunused-value]
45 | for(id; id >= 1; id -= id & (-id)) t2[id] += val;
| ^~
election.cpp: In function 'int GET(int)':
election.cpp:49:6: warning: statement has no effect [-Wunused-value]
49 | for(id; id <= n; id += id & (-id)) ans += t2[id];
| ^~
election.cpp: At global scope:
election.cpp:52:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
52 | main() {
| ^~~~
election.cpp: In function 'int main()':
election.cpp:73:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
73 | if(l == v.size()) {
| ~~^~~~~~~~~~~
election.cpp:82:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | while(l < v.size() && p[v[l]] - p[i - 1] > 0) upd(1, 1, v[l], 1, n, -1), upd(v[l], -1), UPD(v[l], 1), ++l;
| ~~^~~~~~~~~~
election.cpp:87:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
87 | for(int j = 0; j < x[i].size(); j++) {
| ~~^~~~~~~~~~~~~
election.cpp:88:78: error: no matching function for call to 'max(long long int, int)'
88 | ans[x[i][j].f] = max(0ll, get(1, i, x[i][j].s, 1, n) - get(x[i][j].s + 1)) + GET(i) - GET(x[i][j].s + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from election.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
election.cpp:88:78: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
88 | ans[x[i][j].f] = max(0ll, get(1, i, x[i][j].s, 1, n) - get(x[i][j].s + 1)) + GET(i) - GET(x[i][j].s + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from election.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
election.cpp:88:78: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
88 | ans[x[i][j].f] = max(0ll, get(1, i, x[i][j].s, 1, n) - get(x[i][j].s + 1)) + GET(i) - GET(x[i][j].s + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from election.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
election.cpp:88:78: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
88 | ans[x[i][j].f] = max(0ll, get(1, i, x[i][j].s, 1, n) - get(x[i][j].s + 1)) + GET(i) - GET(x[i][j].s + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from election.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
election.cpp:88:78: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
88 | ans[x[i][j].f] = max(0ll, get(1, i, x[i][j].s, 1, n) - get(x[i][j].s + 1)) + GET(i) - GET(x[i][j].s + 1);
| ^