candies.cpp: In constructor 'segTreeBeats::node::node(int)':
candies.cpp:27:82: error: expected '{' at end of input
27 | node(int x) : mx1(x), mx2(-inf), mn1(x), mn2(inf), lz(0), mxc(1), mnc(1), sum(x);
| ^
candies.cpp: In function 'segTreeBeats::node operator+(const segTreeBeats::node&)':
candies.cpp:31:25: error: invalid use of non-static data member 'segTreeBeats::node::mx1'
31 | ret.mx1 = max(a.mx1, mx1);
| ^~~
candies.cpp:26:13: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:32:25: error: invalid use of non-static data member 'segTreeBeats::node::mn1'
32 | ret.mn1 = min(a.mn1, mn1);
| ^~~
candies.cpp:26:23: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:33:22: error: invalid use of non-static data member 'segTreeBeats::node::sum'
33 | ret.sum = a.sum + sum;
| ^~~
candies.cpp:26:47: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:34:7: error: invalid use of non-static data member 'segTreeBeats::node::mx1'
34 | if(mx1 == a.mx1) {
| ^~~
candies.cpp:26:13: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:35:23: error: invalid use of non-static data member 'segTreeBeats::node::mxc'
35 | ret.mxc = a.mxc + mxc;
| ^~~
candies.cpp:26:37: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:36:26: error: invalid use of non-static data member 'segTreeBeats::node::mx2'
36 | ret.mx2 = max(a.mx2, mx2);
| ^~~
candies.cpp:26:18: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:38:8: error: invalid use of non-static data member 'segTreeBeats::node::mx1'
38 | if(mx1 > a.mx1) {
| ^~~
candies.cpp:26:13: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:39:16: error: invalid use of non-static data member 'segTreeBeats::node::mxc'
39 | ret.mxc = mxc;
| ^~~
candies.cpp:26:37: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:40:27: error: invalid use of non-static data member 'segTreeBeats::node::mx2'
40 | ret.mx2 = max(a.mx1, mx2);
| ^~~
candies.cpp:26:18: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:43:27: error: invalid use of non-static data member 'segTreeBeats::node::mx1'
43 | ret.mx2 = max(a.mx2, mx1);
| ^~~
candies.cpp:26:13: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:47:7: error: invalid use of non-static data member 'segTreeBeats::node::mn1'
47 | if(mn1 == a.mn1) {
| ^~~
candies.cpp:26:23: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:48:23: error: invalid use of non-static data member 'segTreeBeats::node::mnc'
48 | ret.mnc = a.mnc + mnc;
| ^~~
candies.cpp:26:42: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:49:26: error: invalid use of non-static data member 'segTreeBeats::node::mn2'
49 | ret.mn2 = min(a.mn2, mn2);
| ^~~
candies.cpp:26:28: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:51:8: error: invalid use of non-static data member 'segTreeBeats::node::mn1'
51 | if(mn1 < a.mn1) {
| ^~~
candies.cpp:26:23: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:52:16: error: invalid use of non-static data member 'segTreeBeats::node::mnc'
52 | ret.mnc = mnc;
| ^~~
candies.cpp:26:42: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:53:27: error: invalid use of non-static data member 'segTreeBeats::node::mn2'
53 | ret.mn2 = min(a.mn1, mn2);
| ^~~
candies.cpp:26:28: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp:56:27: error: invalid use of non-static data member 'segTreeBeats::node::mn1'
56 | ret.mn2 = min(a.mn2, mn1);
| ^~~
candies.cpp:26:23: note: declared here
26 | long long mx1, mx2, mn1, mn2, lz, mxc, mnc, sum;
| ^~~
candies.cpp: In member function 'void segTreeBeats::build(int, int, int)':
candies.cpp:74:19: error: no match for 'operator+' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} and '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'})
74 | d[i] = d[i * 2] + d[i * 2 + 1];
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from candies.h:1,
from candies.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)'
508 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::reverse_iterator<_Iterator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from candies.h:1,
from candies.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)'
1540 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::move_iterator<_IteratorL>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6022:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
6022 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6022:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:56,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.tcc:1160:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
1160 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.tcc:1160:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: mismatched types 'const _CharT*' and 'segTreeBeats::node'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:56,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.tcc:1180:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
1180 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.tcc:1180:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6059:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
6059 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6059:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6075:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
6075 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6075:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6087:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
6087 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6087:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6093:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6093 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6093:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats::node>::value_type' {aka 'segTreeBeats::node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
74 | d[i] = d[i * 2] + d[i * 2 + 1];
| ^
In file included from /usr/include/c++/10/string:55,
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 candies.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6099:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6099 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6099:5: note: template argument deduction/substitution failed:
candies.cpp:74:32: note: '__gnu_cxx::__alloc_traits<std::allocator<segTreeBeats::node>, segTreeBeats: