circle_selection.cpp:18:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from circle_selection.cpp:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = C*; _Value = const C; _Compare = main()::<lambda(C&, C&)>]':
/usr/include/c++/7/bits/stl_algobase.h:959:14: required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = C*; _Tp = C; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:2501:26: required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = C*; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:2772:34: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = C*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:5006:28: required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = C*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:5077:36: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = C*; _Compare = main()::<lambda(C&, C&)>]'
circle_selection.cpp:24:48: required from here
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: no match for call to '(main()::<lambda(C&, C&)>) (C&, const C&)'
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate: bool (*)(C&, C&) <conversion>
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: conversion of argument 3 would be ill-formed:
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: binding reference of type 'C&' to 'const C' discards qualifiers
circle_selection.cpp:24:30: note: candidate: main()::<lambda(C&, C&)> <near match>
stable_sort(a,a+n,[](C&x,C&y){return x.r>y.r;});
^
circle_selection.cpp:24:30: note: conversion of argument 2 would be ill-formed:
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from circle_selection.cpp:1:
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: binding reference of type 'C&' to 'const C' discards qualifiers
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = const C; _Iterator = C*; _Compare = main()::<lambda(C&, C&)>]':
/usr/include/c++/7/bits/stl_algo.h:2052:14: required from '_ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = C*; _Tp = C; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:2510:26: required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = C*; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:2772:34: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = C*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:5006:28: required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = C*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(C&, C&)> >]'
/usr/include/c++/7/bits/stl_algo.h:5077:36: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = C*; _Compare = main()::<lambda(C&, C&)>]'
circle_selection.cpp:24:48: required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to '(main()::<lambda(C&, C&)>) (const C&, C&)'
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate: bool (*)(C&, C&) <conversion>
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: conversion of argument 2 would be ill-formed:
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: binding reference of type 'C&' to 'const C' discards qualifiers
circle_selection.cpp:24:30: note: candidate: main()::<lambda(C&, C&)> <near match>
stable_sort(a,a+n,[](C&x,C&y){return x.r>y.r;});
^
circle_selection.cpp:24:30: note: conversion of argument 1 would be ill-formed:
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from circle_selection.cpp:1:
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: binding reference of type 'C&' to 'const C' discards qualifiers
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~