sequence.cpp:51:43: error: wrong number of template arguments (0, should be 1)
51 | struct CHT_black_box : multiset<line, less<>>
| ^
In file included from /usr/include/c++/9/string:48,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/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:44: error: template argument 2 is invalid
51 | struct CHT_black_box : multiset<line, less<>>
| ^~
sequence.cpp:57:13: error: 'iterator' is not a type
57 | bool isect(iterator x, iterator y)
| ^~~~~~~~
sequence.cpp:57:25: error: 'iterator' is not a type
57 | bool isect(iterator x, iterator y)
| ^~~~~~~~
sequence.cpp: In member function 'bool CHT_black_box::isect(int, int)':
sequence.cpp:59:15: error: no matching function for call to 'end()'
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/c++/9/bits/range_access.h:36,
from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
99 | end(initializer_list<_Tp> __ils) noexcept
| ^~~
/usr/include/c++/9/initializer_list:99:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:68:5: note: candidate: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
68 | end(_Container& __cont) -> decltype(__cont.end())
| ^~~
/usr/include/c++/9/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:78:5: note: candidate: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
78 | end(const _Container& __cont) -> decltype(__cont.end())
| ^~~
/usr/include/c++/9/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:97:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
97 | end(_Tp (&__arr)[_Nm])
| ^~~
/usr/include/c++/9/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from sequence.cpp:1:
/usr/include/c++/9/valarray:1234:5: note: candidate: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
1234 | end(valarray<_Tp>& __va)
| ^~~
/usr/include/c++/9/valarray:1234:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from sequence.cpp:1:
/usr/include/c++/9/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++/9/valarray:1244:5: note: template argument deduction/substitution failed:
sequence.cpp:59:15: note: candidate expects 1 argument, 0 provided
59 | if(y == end()){x->p = INF; return false;}
| ^
sequence.cpp:59:19: error: base operand of '->' is not a pointer
59 | if(y == end()){x->p = INF; return false;}
| ^~
sequence.cpp:60:7: error: base operand of '->' is not a pointer
60 | if(x->m == y->m) x->p = (x->c > y->c) ? INF : -INF;
| ^~
sequence.cpp:60:15: error: base operand of '->' is not a pointer
60 | if(x->m == y->m) x->p = (x->c > y->c) ? INF : -INF;
| ^~
sequence.cpp:60:21: error: base operand of '->' is not a pointer
60 | if(x->m == y->m) x->p = (x->c > y->c) ? INF : -INF;
| ^~
sequence.cpp:60:29: error: base operand of '->' is not a pointer
60 | if(x->m == y->m) x->p = (x->c > y->c) ? INF : -INF;
| ^~
sequence.cpp:60:36: error: base operand of '->' is not a pointer
60 | if(x->m == y->m) x->p = (x->c > y->c) ? INF : -INF;
| ^~
sequence.cpp:61:9: error: base operand of '->' is not a pointer
61 | else x->p = div((y->c - x->c),(x->m - y->m));
| ^~
sequence.cpp:61:21: error: base operand of '->' is not a pointer
61 | else x->p = div((y->c - x->c),(x->m - y->m));
| ^~
sequence.cpp:61:28: error: base operand of '->' is not a pointer
61 | else x->p = div((y->c - x->c),(x->m - y->m));
| ^~
sequence.cpp:61:35: error: base operand of '->' is not a pointer
61 | else x->p = div((y->c - x->c),(x->m - y->m));
| ^~
sequence.cpp:61:42: error: base operand of '->' is not a pointer
61 | else x->p = div((y->c - x->c),(x->m - y->m));
| ^~
sequence.cpp:62:12: error: base operand of '->' is not a pointer
62 | return (x->p >= y->p);
| ^~
sequence.cpp:62:20: error: base operand of '->' is not a pointer
62 | return (x->p >= y->p);
| ^~
sequence.cpp: In member function 'void CHT_black_box::add(long long int, long long int)':
sequence.cpp:66:12: error: 'insert' was not declared in this scope; did you mean 'isect'?
66 | auto z = insert({mode * slope, mode * intercept, 0}), y = z++, x = y;
| ^~~~~~
| isect
sequence.cpp:67:15: error: 'y' was not declared in this scope
67 | while(isect(y, z)) z = erase(z);
| ^
sequence.cpp:67:26: error: 'erase' was not declared in this scope
67 | while(isect(y, z)) z = erase(z);
| ^~~~~
sequence.cpp:68:6: error: 'x' was not declared in this scope
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:68:17: error: no matching function for call to 'begin()'
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/9/bits/range_access.h:36,
from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/initializer_list:89:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)'
89 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/9/initializer_list:89:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:48:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&)'
48 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/9/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:58:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)'
58 | begin(const _Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/9/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:87:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])'
87 | begin(_Tp (&__arr)[_Nm])
| ^~~~~
/usr/include/c++/9/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from sequence.cpp:1:
/usr/include/c++/9/valarray:1214:5: note: candidate: 'template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)'
1214 | begin(valarray<_Tp>& __va)
| ^~~~~
/usr/include/c++/9/valarray:1214:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from sequence.cpp:1:
/usr/include/c++/9/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++/9/valarray:1224:5: note: template argument deduction/substitution failed:
sequence.cpp:68:17: note: candidate expects 1 argument, 0 provided
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:68:33: error: 'y' was not declared in this scope
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^
sequence.cpp:68:50: error: 'erase' was not declared in this scope
68 | if(x != begin() && isect(--x, y)) isect(x, y = erase(y));
| ^~~~~
sequence.cpp:69:10: error: 'y' was not declared in this scope
69 | while((y=x) != begin() && (--x)->p >= y->p) isect(x, erase(y));
| ^
sequence.cpp:69:12: error: 'x' was not declared in this scope
69 | while((y=x) != begin() && (--x)->p >= y->p) isect(x, erase(y));
| ^
sequence.cpp:69:24: error: no matching function for call to 'begin()'
69 | while((y=x) != begin() && (--x)->p >= y->p) isect(x, erase(y));
| ^
In file included from /usr/include/c++/9/bits/range_access.h:36,
from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/initializer_list:89:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)'
89 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/9/initializer_list:89:5: note: template argument deduction/substitution failed:
sequence.cpp:69:24: note: candidate expects 1 argument, 0 provided
69 | while((y=x) != begin() && (--x)->p >= y->p) isect(x, erase(y));
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from sequence.cpp:1:
/usr/include/c++/9/bits/range_access.h:48:5: note: candidate: 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&)'
48 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/9/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
sequence.cpp:69:24: note: candidate expects 1 argument, 0 provided
69 | while((y=x) != begin() && (--x)->p >= y->p) isect(x, erase(y));
| ^
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,