Problem explosion
User PlayVoltz
Submission Time 2023-07-19 10:07:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

explosion.cpp: In function ‘bool customsort(std::pair<int, std::pair<int, int> >&, std::pair<int, std::pair<int, int> >&)’:
explosion.cpp:7:30: error: no match for ‘operator-’ (operand types are ‘int’ and ‘std::pair<int, int>’)
7 | return abs(a-ab.first)+abs(b-ab.second)< abs(a-ba.first)+abs(b-ba.second);
| ~^~~~~~~~~~
| | |
| 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 explosion.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::oper