Problem explosion
User lty748
Submission Time 2023-11-08 21:30:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

explosion.cpp: In function ‘int main()’:
explosion.cpp:35:43: error: no matching function for call to ‘sort(std::vector<std::pair<long long int, long long int> >&, main()::<lambda(const auto:1&, const auto:2&)>)’
35 | { return lhs.first < rhs.first; });
| ^
In file included from /usr/include/c++/9/algorithm:62,
from explosion.cpp:3:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
explosion.cpp:35:43: note: deduced conflicting types for parameter ‘_RAIter’ (‘std::vector<std::pair<long long int, long long int> >’ and ‘main()::<lambda(const auto:1&, const auto:2&)>’)
35