Problem fractions
User gordonlu
Submission Time 2023-11-17 13:17:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fractions.cpp: In lambda function:
fractions.cpp:27:19: error: no match for ‘operator-’ (operand types are ‘const std::pair<double, double>’ and ‘std::vector<std::pair<double, double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<std::pair<double, double>*, std::vector<std::pair<double, double> > >’})
27 | return ((pairA - copy.begin()) < (pairB - copy.begin()));
| ~~~~~ ^ ~~~~~~~~~~~~
| | |
| | std::vector<std::pair<double, double> >::iterator {aka __gnu_cxx::__normal_iterator<std::pair<double, double>*, std::vector<std::pair<double, double> > >}
| const std::pair<double, double>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,