Problem | ballot |
---|---|
User | Henries |
Submission Time | 2024-10-28 22:10:04 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
ballot.cpp: In function ‘int main()’:
ballot.cpp:17:31: error: ‘struct std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >’ has no member named ‘first’
17 | long long currentdiff = *it.first - pick;
| ^~~~~
ballot.cpp:18:32: error: ‘std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >::_Self’ {aka ‘struct std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >’} has no member named ‘first’
18 | long long diff = abs(*(it--).first - pick);
| ^~~~~
ballot.cpp:20:16: error: no match for ‘operator+’ (operand types are ‘std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >’ and ‘int’)
20 | cout << (it + 1).second<<' ';
| ~~ ^ ~
| | |
| | int
| std::_Rb_tree_const_it