Potvynis

Taškai: 0

Compile: FAIL

potvynis.cpp: In function ‘int main()’: potvynis.cpp:84:46: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(mas, mas + (n + 2) * (m + 2), [](const auto & i, const auto & j) -> bool { ^ potvynis.cpp:84:62: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(mas, mas + (n + 2) * (m + 2), [](const auto & i, const auto & j) -> bool { ^ potvynis.cpp: In lambda function: potvynis.cpp:85:16: error: request for member ‘first’ in ‘i’, which is of non-class type ‘const int’ return dal[i.first][i.second] < dal[j.first][j.second]; ^ potvynis.cpp:85:25: error: request for member ‘second’ in ‘i’, which is of non-class type ‘const int’ return dal[i.first][i.second] < dal[j.first][j.second]; ^ potvynis.cpp:85:41: error: request for member ‘first’ in ‘j’, which is of non-class type ‘const int’ return dal[i.first][i.second] < dal[j.first][j.second]; ^ potvynis.cpp:85:50: error: request for member ‘second’ in ‘j’, which is of non-class type ‘const int’ return dal[i.first][i.second] < dal[j.first][j.second]; ^ 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 potvynis.cpp:7: /usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = std::pair<int, int>*; _Iterator2 = std::pair<int, int>*; _Compare = main()::<lambda(const int&, const int&)>]’: /usr/include/c++/5/bits/stl_algo.h:1842:14: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1880:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1966:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<int, int>*; _Compare = main()::<lambda(const int&, const int&)>]’ potvynis.cpp:86:3: required from here /usr/include/c++/5/bits/predefined_ops.h:123:46: error: no match for call to ‘(main()::<lambda(const int&, const int&)>) (std::pair<int, int>&, std::pair<int, int>&)’ { return bool(_M_comp(*__it1, *__it2)); } ^ /usr/include/c++/5/bits/predefined_ops.h:123:46: note: candidate: bool (*)(const int&, const int&) <conversion> /usr/include/c++/5/bits/predefined_ops.h:123:46: note: candidate expects 3 arguments, 3 provided potvynis.cpp:84:75: note: candidate: main()::<lambda(const int&, const int&)> sort(mas, mas + (n + 2) * (m + 2), [](const auto & i, const auto & j) -> bool { ^ potvynis.cpp:84:75: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const 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 potvynis.cpp:7: /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::pair<int, int>; _Iterator = std::pair<int, int>*; _Compare = main()::<lambda(const int&, const int&)>]’: /usr/include/c++/5/bits/stl_algo.h:1823:20: required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1850:36: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1880:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1966:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<int, int>*; _Compare = main()::<lambda(const int&, const int&)>]’ potvynis.cpp:86:3: required from here /usr/include/c++/5/bits/predefined_ops.h:169:37: error: no match for call to ‘(main()::<lambda(const int&, const int&)>) (std::pair<int, int>&, std::pair<int, int>&)’ { return bool(_M_comp(__val, *__it)); } ^ /usr/include/c++/5/bits/predefined_ops.h:169:37: note: candidate: bool (*)(const int&, const int&) <conversion> /usr/include/c++/5/bits/predefined_ops.h:169:37: note: candidate expects 3 arguments, 3 provided potvynis.cpp:84:75: note: candidate: main()::<lambda(const int&, const int&)> sort(mas, mas + (n + 2) * (m + 2), [](const auto & i, const auto & j) -> bool { ^ potvynis.cpp:84:75: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const 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 potvynis.cpp:7: /usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = std::pair<int, int>*; _Value = std::pair<int, int>; _Compare = main()::<lambda(const int&, const int&)>]’: /usr/include/c++/5/bits/stl_heap.h:129:48: required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_heap.h:228:23: required from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_heap.h:333:22: required from ‘void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1669:23: required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1928:25: required from ‘void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1943:27: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:1963:25: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(const int&, const int&)> >]’ /usr/include/c++/5/bits/stl_algo.h:4729:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<int, int>*; _Compare = main()::<lambda(const int&, const int&)>]’ potvynis.cpp:86:3: required from here /usr/include/c++/5/bits/predefined_ops.h:144:37: error: no match for call to ‘(main()::<lambda(const int&, const int&)>) (std::pair<int, int>&, std::pair<int, int>&)’ { return bool(_M_comp(*__it, __val)); } ^ /usr/include/c++/5/bits/predefined_ops.h:144:37: note: candidate: bool (*)(const int&, const int&) <conversion> /usr/include/c++/5/bits/predefined_ops.h:144:37: note: candidate expects 3 arguments, 3 provided potvynis.cpp:84:75: note: candidate: main()::<lambda(const int&, const int&)> sort(mas, mas + (n + 2) * (m + 2), [](const auto & i, const auto & j) -> bool { ^ potvynis.cpp:84:75: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const int&’

nr.resulttimemessage