QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#571641#6385. SwordskheiramihoubCompile Error//C++14783b2024-09-18 02:00:112024-09-18 02:00:12

详细

answer.code: In lambda function:
answer.code:14:83: error: expected ‘{’ before ‘)’ token
   14 |     sort(syoufa.rbegin() , syoufa.rend() , [](pair<int,int> a , pair<int,int> b ) ) {
      |                                                                                   ^
answer.code: In function ‘int main()’:
answer.code:14:84: error: expected ‘;’ before ‘{’ token
   14 |     sort(syoufa.rbegin() , syoufa.rend() , [](pair<int,int> a , pair<int,int> b ) ) {
      |                                                                                    ^~
      |                                                                                    ;
In file included from /usr/include/c++/13/bits/stl_algobase.h:71,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/bits/predefined_ops.h: In instantiation of ‘constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = std::reverse_iterator<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > > >; _Iterator2 = std::reverse_iterator<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > > >; _Compare = main()::<lambda(std::pair<int, int>, std::pair<int, int>)>]’:
/usr/include/c++/13/bits/stl_algo.h:1819:14:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:1859:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:1950:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:4894:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = main()::<lambda(pair<int, int>, pair<int, int>)>]’
answer.code:14:9:   required from here
/usr/include/c++/13/bits/predefined_ops.h:158:30: error: void value not ignored as it ought to be
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::pair<int, int>; _Iterator = std::reverse_iterator<__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > > >; _Compare = main()::<lambda(std::pair<int, int>, std::pair<int, int>)>]’:
/usr/include/c++/13/bits/stl_algo.h:1799:20:   required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:1827:36:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:1859:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:1950:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(pair<int, int>, pair<int, int>)> >]’
/usr/include/c++/13/bits/stl_algo.h:4894:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = reverse_iterator<__gnu_cxx::__normal_iterator<pair<int, int>*, vector<p...