In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]':
/usr/include/c++/9/bits/stl_algo.h:81:17: required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1920:34: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1952:38: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1967:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:4899:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]'
aliens.cpp:117:113: required from here
/usr/include/c++/9/bits/predefined_ops.h:143:18: error: no match for call to '(take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)'
143 | { return bool(_M_comp(*__it1, *__it2)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aliens.cpp:117:18: note: candidate: 'take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>' <near match>
117 | sort(all(a), [&](pii &x, pii &y) {return x.first < y.first || (x.first == y.first && x.second > y.second); });
| ^
aliens.cpp:117:18: note: conversion of argument 2 would be ill-formed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h:143:18: error: cannot bind non-const lvalue reference of type 'std::pair<int, int>&' to an rvalue of type 'std::pair<int, int>'
143 | { return bool(_M_comp(*__it1, *__it2)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/stl_pair.h:291:19: note: after user-defined conversion: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = long long int; _U2 = long long int; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = int]'
291 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::pair<long long int, long long int>; _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]':
/usr/include/c++/9/bits/stl_algo.h:1827:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1854:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1884:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1970:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:4899:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]'
aliens.cpp:117:113: required from here
/usr/include/c++/9/bits/predefined_ops.h:215:11: error: no match for call to '(take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)'
215 | { return bool(_M_comp(__val, *__it)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
aliens.cpp:117:18: note: candidate: 'take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>' <near match>
117 | sort(all(a), [&](pii &x, pii &y) {return x.first < y.first || (x.first == y.first && x.second > y.second); });
| ^
aliens.cpp:117:18: note: conversion of argument 2 would be ill-formed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h:215:11: error: cannot bind non-const lvalue reference of type 'std::pair<int, int>&' to an rvalue of type 'std::pair<int, int>'
215 | { return bool(_M_comp(__val, *__it)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/stl_pair.h:291:19: note: after user-defined conversion: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = long long int; _U2 = long long int; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = int]'
291 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Value = std::pair<long long int, long long int>; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]':
/usr/include/c++/9/bits/stl_heap.h:133:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Distance = long int; _Tp = std::pair<long long int, long long int>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_heap.h:237:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Distance = long int; _Tp = std::pair<long long int, long long int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_heap.h:342:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1671:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1932:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1947:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:1967:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)> >]'
/usr/include/c++/9/bits/stl_algo.h:4899:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<long long int, long long int>*, std::vector<std::pair<long long int, long long int> > >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>]'
aliens.cpp:117:113: required from here
/usr/include/c++/9/bits/predefined_ops.h:177:11: error: no match for call to '(take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)'
177 | { return bool(_M_comp(*__it, __val)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
aliens.cpp:117:18: note: candidate: 'take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(std::pair<int, int>&, std::pair<int, int>&)>' <near match>
117 | sort(all(a), [&](pii &x, pii &y) {return x.first < y.first || (x.first == y.first && x.second > y.second); });
| ^
aliens.cpp:117:18: note: conversion of argument 2 would be ill-formed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/predefined_ops.h:177:11: error: cannot bind non-const lvalue reference of type 'std::pair<int, int>&' to an rvalue of type 'std::pair<int, int>'
177 | { return bool(_M_comp(*__it, __val)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from aliens.cpp:3:
/usr/include/c++/9/bits/stl_pair.h:291:19: note: after user-defined conversion: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = long long int; _U2 = long long int; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = int]'
291 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
aliens.cpp: In function 'int main()':
aliens.cpp:141:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
141 | scanf("%d %d %d", &n, &m, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
aliens.cpp:144:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
144 | scanf("%d %d", &r[i], &c[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~