Didesnis - gudresnis?

Taškai: 0

Compile: FAIL

drambliai.cpp: In function ‘void solve()’: drambliai.cpp:13:37: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^~~~ drambliai.cpp:13:45: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^~~~ drambliai.cpp: In lambda function: drambliai.cpp:13:62: error: request for member ‘second’ in ‘a’, which is of non-class type ‘int’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^~~~~~ drambliai.cpp:13:73: error: request for member ‘second’ in ‘b’, which is of non-class type ‘int’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^~~~~~ drambliai.cpp: In function ‘void solve()’: drambliai.cpp:14:37: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^~~~ drambliai.cpp:14:45: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^~~~ drambliai.cpp: In lambda function: drambliai.cpp:14:62: error: request for member ‘first’ in ‘a’, which is of non-class type ‘int’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^~~~~ drambliai.cpp:14:72: error: request for member ‘first’ in ‘b’, which is of non-class type ‘int’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^~~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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::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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_algo.h:1826:14: 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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1866: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1957: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:13:9: required from here /usr/include/c++/11/bits/predefined_ops.h:158:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~ drambliai.cpp:13:34: note: candidate: ‘solve()::<lambda(int, int)>’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^ drambliai.cpp:13:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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::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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_algo.h:1826:14: 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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1866: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1957: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:14:9: required from here /usr/include/c++/11/bits/predefined_ops.h:158:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~ drambliai.cpp:14:34: note: candidate: ‘solve()::<lambda(int, int)>’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^ drambliai.cpp:14:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_algo.h:1806: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1834: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1866: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1957: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:13:9: required from here /usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 240 | { return bool(_M_comp(__val, *__it)); } | ~~~~~~~^~~~~~~~~~~~~~ drambliai.cpp:13:34: note: candidate: ‘solve()::<lambda(int, int)>’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^ drambliai.cpp:13:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_algo.h:1806: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1834: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1866: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1957: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:14:9: required from here /usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 240 | { return bool(_M_comp(__val, *__it)); } | ~~~~~~~^~~~~~~~~~~~~~ drambliai.cpp:14:34: note: candidate: ‘solve()::<lambda(int, int)>’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^ drambliai.cpp:14:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_heap.h:139: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_heap.h:246: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_heap.h:355: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1646: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1917: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1933: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1954: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:13:9: required from here /usr/include/c++/11/bits/predefined_ops.h:196:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 196 | { return bool(_M_comp(*__it, __val)); } | ~~~~~~~^~~~~~~~~~~~~~ drambliai.cpp:13:34: note: candidate: ‘solve()::<lambda(int, int)>’ 13 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.second > b.second;}); | ^ drambliai.cpp:13:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from drambliai.cpp:1: /usr/include/c++/11/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 = solve()::<lambda(int, int)>]’: /usr/include/c++/11/bits/stl_heap.h:139: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_heap.h:246: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_heap.h:355: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1646: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1917: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1933: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:1954: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<solve()::<lambda(int, int)> >]’ /usr/include/c++/11/bits/stl_algo.h:4875: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 = solve()::<lambda(int, int)>]’ drambliai.cpp:14:9: required from here /usr/include/c++/11/bits/predefined_ops.h:196:30: error: no match for call to ‘(solve()::<lambda(int, int)>) (std::pair<long long int, long long int>&, std::pair<long long int, long long int>&)’ 196 | { return bool(_M_comp(*__it, __val)); } | ~~~~~~~^~~~~~~~~~~~~~ drambliai.cpp:14:34: note: candidate: ‘solve()::<lambda(int, int)>’ 14 | sort(arr.begin(), arr.end(), [](auto a, auto b){return a.first < b.first;}); | ^ drambliai.cpp:14:34: note: no known conversion for argument 1 from ‘std::pair<long long int, long long int>’ to ‘int’

nr.resulttimemessage