sequence.cpp:51:47: error: wrong number of template arguments (0, should be 1)
51 | struct LineContainer : multiset<Line, less<>> {
| ^
In file included from /usr/include/c++/10/string:48,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/stl_function.h:381:12: note: provided for 'template<class _Tp> struct std::less'
381 | struct less : public binary_function<_Tp, _Tp, bool>
| ^~~~
sequence.cpp:51:48: error: template argument 2 is invalid
51 | struct LineContainer : multiset<Line, less<>> {
| ^~
sequence.cpp:55:17: error: 'iterator' is not a type
55 | bool isect(iterator x, iterator y) {
| ^~~~~~~~
sequence.cpp:55:29: error: 'iterator' is not a type
55 | bool isect(iterator x, iterator y) {
| ^~~~~~~~
sequence.cpp: In member function 'bool LineContainer::isect(int, int)':
sequence.cpp:56:20: error: no matching function for call to 'end()'
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/c++/10/bits/range_access.h:36,
from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/initializer_list:101:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
101 | end(initializer_list<_Tp> __ils) noexcept
| ^~~
/usr/include/c++/10/initializer_list:101:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:71:5: note: candidate: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
71 | end(_Container& __cont) -> decltype(__cont.end())
| ^~~
/usr/include/c++/10/bits/range_access.h:71:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:81:5: note: candidate: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
81 | end(const _Container& __cont) -> decltype(__cont.end())
| ^~~
/usr/include/c++/10/bits/range_access.h:81:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:100:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
100 | end(_Tp (&__arr)[_Nm])
| ^~~
/usr/include/c++/10/bits/range_access.h:100:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from sequence.cpp:4:
/usr/include/c++/10/valarray:1234:5: note: candidate: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
1234 | end(valarray<_Tp>& __va)
| ^~~
/usr/include/c++/10/valarray:1234:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from sequence.cpp:4:
/usr/include/c++/10/valarray:1244:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
1244 | end(const valarray<_Tp>& __va)
| ^~~
/usr/include/c++/10/valarray:1244:5: note: template argument deduction/substitution failed:
sequence.cpp:56:20: note: candidate expects 1 argument, 0 provided
56 | if (y == end()) return x->p = inf, 0;
| ^
sequence.cpp:56:31: error: base operand of '->' is not a pointer
56 | if (y == end()) return x->p = inf, 0;
| ^~
sequence.cpp:57:12: error: base operand of '->' is not a pointer
57 | if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
| ^~
sequence.cpp:57:20: error: base operand of '->' is not a pointer
57 | if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
| ^~
sequence.cpp:57:26: error: base operand of '->' is not a pointer
57 | if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
| ^~
sequence.cpp:57:33: error: base operand of '->' is not a pointer
57 | if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
| ^~
sequence.cpp:57:40: error: base operand of '->' is not a pointer
57 | if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
| ^~
sequence.cpp:58:13: error: base operand of '->' is not a pointer
58 | else x->p = div(y->m - x->m, x->k - y->k);
| ^~
sequence.cpp:58:24: error: base operand of '->' is not a pointer
58 | else x->p = div(y->m - x->m, x->k - y->k);
| ^~
sequence.cpp:58:31: error: base operand of '->' is not a pointer
58 | else x->p = div(y->m - x->m, x->k - y->k);
| ^~
sequence.cpp:58:37: error: base operand of '->' is not a pointer
58 | else x->p = div(y->m - x->m, x->k - y->k);
| ^~
sequence.cpp:58:44: error: base operand of '->' is not a pointer
58 | else x->p = div(y->m - x->m, x->k - y->k);
| ^~
sequence.cpp:59:15: error: base operand of '->' is not a pointer
59 | return x->p >= y->p;
| ^~
sequence.cpp:59:23: error: base operand of '->' is not a pointer
59 | return x->p >= y->p;
| ^~
sequence.cpp: In member function 'void LineContainer::add(ll, ll, ll)':
sequence.cpp:62:16: error: 'insert' was not declared in this scope; did you mean 'isect'?
62 | auto z = insert({k, m, 0, idx}), y = z++, x = y;
| ^~~~~~
| isect
sequence.cpp:63:20: error: 'y' was not declared in this scope
63 | while (isect(y, z)) z = erase(z);
| ^
sequence.cpp:63:31: error: 'erase' was not declared in this scope
63 | while (isect(y, z)) z = erase(z);
| ^~~~~
sequence.cpp:64:11: error: 'x' was not declared in this scope
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:64:22: error: no matching function for call to 'begin()'
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/10/bits/range_access.h:36,
from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/initializer_list:90:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)'
90 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/10/initializer_list:90:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:51:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&)'
51 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/10/bits/range_access.h:51:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:61:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)'
61 | begin(const _Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/10/bits/range_access.h:61:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:90:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])'
90 | begin(_Tp (&__arr)[_Nm])
| ^~~~~
/usr/include/c++/10/bits/range_access.h:90:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from sequence.cpp:4:
/usr/include/c++/10/valarray:1214:5: note: candidate: 'template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)'
1214 | begin(valarray<_Tp>& __va)
| ^~~~~
/usr/include/c++/10/valarray:1214:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from sequence.cpp:4:
/usr/include/c++/10/valarray:1224:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
/usr/include/c++/10/valarray:1224:5: note: template argument deduction/substitution failed:
sequence.cpp:64:22: note: candidate expects 1 argument, 0 provided
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:64:38: error: 'y' was not declared in this scope
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:64:55: error: 'erase' was not declared in this scope
64 | if (x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^~~~~
sequence.cpp:65:15: error: 'y' was not declared in this scope
65 | while ((y = x) != begin() && (--x)->p >= y->p)
| ^
sequence.cpp:65:19: error: 'x' was not declared in this scope
65 | while ((y = x) != begin() && (--x)->p >= y->p)
| ^
sequence.cpp:65:31: error: no matching function for call to 'begin()'
65 | while ((y = x) != begin() && (--x)->p >= y->p)
| ^
In file included from /usr/include/c++/10/bits/range_access.h:36,
from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/initializer_list:90:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)'
90 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/10/initializer_list:90:5: note: template argument deduction/substitution failed:
sequence.cpp:65:31: note: candidate expects 1 argument, 0 provided
65 | while ((y = x) != begin() && (--x)->p >= y->p)
| ^
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from sequence.cpp:4:
/usr/include/c++/10/bits/range_access.h:51:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&)'
51 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/10/bits/range_access.h:51:5: note: template argument deduction/substitution failed:
sequence.cpp:65:31: note: candidate expects 1 argument, 0 provided
65 | while ((y = x) != begin() && (--x)->p >= y->p)
| ^
In file included from /usr/include/c++/10/s