QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#525921 | #9127. Optimal Train Operation | ucup-team3057 | Compile Error | / | / | C++17 | 5.9kb | 2024-08-21 03:31:35 | 2024-08-21 03:31:35 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In member function ‘void kinetic_segtree::update(long long int)’: answer.code:45:27: error: no matching function for call to ‘min(<brace-enclosed initializer list>)’ 45 | tree[v].melt = min({tree[v].melt, tree[v << 1].melt, tree[v << 1 | 1].melt}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/string:51, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from answer.code:1: /usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: answer.code:45:27: note: candidate expects 2 arguments, 1 provided 45 | tree[v].melt = min({tree[v].melt, tree[v << 1].melt, tree[v << 1 | 1].melt}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed: answer.code:45:27: note: candidate expects 3 arguments, 1 provided 45 | tree[v].melt = min({tree[v].melt, tree[v << 1].melt, tree[v << 1 | 1].melt}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code: In function ‘void solve()’: answer.code:157:40: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::value_type’ {aka ‘std::array<long long int, 3>’} and ‘int’) 157 | while (!st.empty() && st.back()[2] <= val) { | ^ answer.code:158:29: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::value_type’ {aka ‘std::array<long long int, 3>’} and ‘int’) 158 | t1.add(st.back()[0], st.back()[1], 0, val - st.back()[2]); | ^ answer.code:158:43: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::value_type’ {aka ‘std::array<long long int, 3>’} and ‘int’) 158 | t1.add(st.back()[0], st.back()[1], 0, val - st.back()[2]); | ^ answer.code:158:66: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::value_type’ {aka ‘std::array<long long int, 3>’} and ‘int’) 158 | t1.add(st.back()[0], st.back()[1], 0, val - st.back()[2]); | ^ answer.code:165:43: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::value_type’ {aka ‘std::array<long long int, 3>’} and ‘int’) 165 | if (!st.empty()) new_l = st.back()[1] + 1; | ^ answer.code:167:21: error: no matching function for call to ‘std::vector<std::array<long long int, 3> >::push_back(<brace-enclosed initializer list>)’ 167 | st.push_back({new_l, new_r, val}); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/vector:66, from answer.code:2: /usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<long long int, 3>; _Alloc = std::allocator<std::array<long long int, 3> >; value_type = std::array<long long int, 3>]’ 1278 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<long long int, 3> >::value_type&’ {aka ‘const std::array<long long int, 3>&’} 1278 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<long long int, 3>; _Alloc = std::allocator<std::array<long long int, 3> >;...