Olimpiada
- [1] 2022-11-26 12:04 (0)
- [2] 2022-11-26 12:05 (58.1)
- [3] 2022-11-26 12:06 (61.3)
- [4] 2022-11-26 12:15 (0)
- [5] 2022-11-26 12:15 (61.3)
- [6] 2022-11-26 12:19 (61.3)
- [7] 2022-11-26 12:25 (100)
Taškai: 0
Compile: FAIL
olimpiada.cpp: In function ‘void solve()’: olimpiada.cpp:18:37: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp:18:45: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp: In lambda function: olimpiada.cpp:18:62: error: request for member ‘size’ in ‘i’, which is of non-class type ‘int’ sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp:18:73: error: request for member ‘size’ in ‘j’, which is of non-class type ‘int’ sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/istream:38, from /usr/include/c++/5/sstream:38, from /usr/include/c++/5/complex:45, from /usr/include/c++/5/ccomplex:38, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52, from olimpiada.cpp:1: /usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = solve()::<lambda(int, int)>]’: /usr/include/c++/5/bits/stl_algo.h:1842:14: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1880:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1966:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = solve()::<lambda(int, int)>]’ olimpiada.cpp:18:81: required from here /usr/include/c++/5/bits/predefined_ops.h:123:46: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::vector<long long int>&, std::vector<long long int>&)’ { return bool(_M_comp(*__it1, *__it2)); } ^ /usr/include/c++/5/bits/predefined_ops.h:123:46: note: candidate: void (*)(int, int) <conversion> /usr/include/c++/5/bits/predefined_ops.h:123:46: note: candidate expects 3 arguments, 3 provided olimpiada.cpp:18:51: note: candidate: solve()::<lambda(int, int)> sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp:18:51: note: no known conversion for argument 1 from ‘std::vector<long long int>’ to ‘int’ In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/istream:38, from /usr/include/c++/5/sstream:38, from /usr/include/c++/5/complex:45, from /usr/include/c++/5/ccomplex:38, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52, from olimpiada.cpp:1: /usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::vector<long long int>; _Iterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = solve()::<lambda(int, int)>]’: /usr/include/c++/5/bits/stl_algo.h:1823:20: required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1850:36: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1880:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1966:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = solve()::<lambda(int, int)>]’ olimpiada.cpp:18:81: required from here /usr/include/c++/5/bits/predefined_ops.h:169:37: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::vector<long long int>&, std::vector<long long int>&)’ { return bool(_M_comp(__val, *__it)); } ^ /usr/include/c++/5/bits/predefined_ops.h:169:37: note: candidate: void (*)(int, int) <conversion> /usr/include/c++/5/bits/predefined_ops.h:169:37: note: candidate expects 3 arguments, 3 provided olimpiada.cpp:18:51: note: candidate: solve()::<lambda(int, int)> sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp:18:51: note: no known conversion for argument 1 from ‘std::vector<long long int>’ to ‘int’ In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/istream:38, from /usr/include/c++/5/sstream:38, from /usr/include/c++/5/complex:45, from /usr/include/c++/5/ccomplex:38, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52, from olimpiada.cpp:1: /usr/include/c++/5/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::vector<long long int>*, std::vector<std::vector<long long int> > >; _Value = std::vector<long long int>; _Compare = solve()::<lambda(int, int)>]’: /usr/include/c++/5/bits/stl_heap.h:129:48: required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Distance = long int; _Tp = std::vector<long long int>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_heap.h:228:23: required from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Distance = long int; _Tp = std::vector<long long int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_heap.h:333:22: required from ‘void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1669:23: required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1928:25: required from ‘void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1943:27: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:1963:25: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<solve()::<lambda(int, int)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::vector<long long int>*, std::vector<std::vector<long long int> > >; _Compare = solve()::<lambda(int, int)>]’ olimpiada.cpp:18:81: required from here /usr/include/c++/5/bits/predefined_ops.h:144:37: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::vector<long long int>&, std::vector<long long int>&)’ { return bool(_M_comp(*__it, __val)); } ^ /usr/include/c++/5/bits/predefined_ops.h:144:37: note: candidate: void (*)(int, int) <conversion> /usr/include/c++/5/bits/predefined_ops.h:144:37: note: candidate expects 3 arguments, 3 provided olimpiada.cpp:18:51: note: candidate: solve()::<lambda(int, int)> sort(arr.begin(), arr.end(), [](auto i, auto j){return i.size() > j.size();}); ^ olimpiada.cpp:18:51: note: no known conversion for argument 1 from ‘std::vector<long long int>’ to ‘int’
nr. | result | time | message |
---|