collapse.cpp: In function 'void genDSU()':
collapse.cpp:144:29: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^~~~
collapse.cpp:144:44: error: use of 'auto' in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^~~~
collapse.cpp: In lambda function:
collapse.cpp:33:11: error: request for member 'first' in 'a', which is of non-class type 'const int'
#define f first
^
collapse.cpp:144:64: note: in expansion of macro 'f'
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^
collapse.cpp:33:11: error: request for member 'first' in 'b', which is of non-class type 'const int'
#define f first
^
collapse.cpp:144:70: note: in expansion of macro 'f'
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^
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 collapse.cpp:1:
/usr/include/c++/7/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<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = genDSU()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1847:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = genDSU()::<lambda(const int&, const int&)>]'
collapse.cpp:144:73: required from here
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: no match for call to '(genDSU()::<lambda(const int&, const int&)>) (std::pair<std::pair<int, int>, std::bitset<1000> >&, std::pair<std::pair<int, int>, std::bitset<1000> >&)'
{ return bool(_M_comp(*__it1, *__it2)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:143:18: note: candidate: void (*)(const int&, const int&) <conversion>
/usr/include/c++/7/bits/predefined_ops.h:143:18: note: candidate expects 3 arguments, 3 provided
collapse.cpp:144:51: note: candidate: genDSU()::<lambda(const int&, const int&)>
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^
collapse.cpp:144:51: note: no known conversion for argument 1 from 'std::pair<std::pair<int, int>, std::bitset<1000> >' to 'const int&'
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 collapse.cpp:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::pair<std::pair<int, int>, std::bitset<1000> >; _Iterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = genDSU()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_algo.h:1828:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1855:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1885:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1971:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = genDSU()::<lambda(const int&, const int&)>]'
collapse.cpp:144:73: required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to '(genDSU()::<lambda(const int&, const int&)>) (std::pair<std::pair<int, int>, std::bitset<1000> >&, std::pair<std::pair<int, int>, std::bitset<1000> >&)'
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate: void (*)(const int&, const int&) <conversion>
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate expects 3 arguments, 3 provided
collapse.cpp:144:51: note: candidate: genDSU()::<lambda(const int&, const int&)>
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^
collapse.cpp:144:51: note: no known conversion for argument 1 from 'std::pair<std::pair<int, int>, std::bitset<1000> >' to 'const int&'
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 collapse.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 = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Value = std::pair<std::pair<int, int>, std::bitset<1000> >; _Compare = genDSU()::<lambda(const int&, const int&)>]':
/usr/include/c++/7/bits/stl_heap.h:133:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Distance = long int; _Tp = std::pair<std::pair<int, int>, std::bitset<1000> >; _Compare = __gnu_cxx::__ops::_Iter_comp_val<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:237:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Distance = long int; _Tp = std::pair<std::pair<int, int>, std::bitset<1000> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_heap.h:342:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1672:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1933:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1948:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:1968:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<genDSU()::<lambda(const int&, const int&)> >]'
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::bitset<1000> >*, std::vector<std::pair<std::pair<int, int>, std::bitset<1000> > > >; _Compare = genDSU()::<lambda(const int&, const int&)>]'
collapse.cpp:144:73: required from here
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: no match for call to '(genDSU()::<lambda(const int&, const int&)>) (std::pair<std::pair<int, int>, std::bitset<1000> >&, std::pair<std::pair<int, int>, std::bitset<1000> >&)'
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate: void (*)(const int&, const int&) <conversion>
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate expects 3 arguments, 3 provided
collapse.cpp:144:51: note: candidate: genDSU()::<lambda(const int&, const int&)>
sort(all(todo),[](const auto& a, const auto& b) { return a.f < b.f;});
^
collapse.cpp:144:51: note: no known conversion for argument 1 from 'std::pair<std::pair<int, int>, std::bitset<1000> >' to 'const int&'