Problem 4sum
User Hengweezy
Submission Time 2024-02-14 16:44:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

4sum.cpp: In function ‘int main()’:
4sum.cpp:50:31: error: no match for ‘operator+’ (operand types are ‘std::set<std::pair<int, std::pair<int, int> > >::iterator’ {aka ‘std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >’} and ‘int’)
50 | int value = *(v1.begin() + idx1) + *(v2.rbegin() + idx2);
| ~~~~~~~~~~ ^ ~~~~
| | |
| | int
| std::set<std::pair<int, std::pair<int, int> > >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >}
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from