foodcourt.cpp: In member function 'void SegmentTree<T>::operator=(int64_t)':
foodcourt.cpp:17:21: error: no matching function for call to 'max(int64_t&, long long int)'
17 | a[i] = {max(v, 0LL), v, i-n};
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from foodcourt.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
foodcourt.cpp:17:21: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
17 | a[i] = {max(v, 0LL), v, i-n};
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from foodcourt.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
foodcourt.cpp:17:21: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
17 | a[i] = {max(v, 0LL), v, i-n};
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from foodcourt.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
foodcourt.cpp:17:21: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
17 | a[i] = {max(v, 0LL), v, i-n};
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from foodcourt.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
foodcourt.cpp:17:21: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
17 | a[i] = {max(v, 0LL), v, i-n};
| ^
foodcourt.cpp: In instantiation of 'void SegmentTree<T>::operator=(int64_t) [with T = std::array<long int, 3>; int64_t = long int]':
foodcourt.cpp:80:12: required from here
foodcourt.cpp:17:8: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::array<long int, 3> >, std::array<long int, 3> >::value_type' {aka 'std::array<long int, 3>'} and '<brace-enclosed initializer list>')
17 | a[i] = {max(v, 0LL), v, i-n};
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from foodcourt.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'constexpr std::array<long int, 3>& std::array<long int, 3>::operator=(const std::array<long int, 3>&)'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::array<long int, 3>&'
/usr/include/c++/10/array:94:12: note: candidate: 'constexpr std::array<long int, 3>& std::array<long int, 3>::operator=(std::array<long int, 3>&&)'
/usr/include/c++/10/array:94:12: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::array<long int, 3>&&'