Problem ballot
User YSH2020
Submission Time 2025-01-17 15:07:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ballot.cpp: In function ‘int main()’:
ballot.cpp:15:16: error: ‘class std::set<std::pair<long long int, long long int> >’ has no member named ‘push_back’
15 | ballot.push_back(make_pair(tmp, i+1));
| ^~~~~~~~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from ballot.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(std::pair<int, int>, std::pair<int, int>)>]’:
/usr/include/c++/9/bits/stl_algo.h:4905:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::_Rb_tree_const_iterator<std::pair<long long int, long long int