Problem lasers2
User jatro13
Submission Time 2026-03-26 10:54:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lasers2.cpp: In function ‘ll f(int, int)’:
lasers2.cpp:18:15: error: ‘std::tuple<int, int, long long int> <structured bindings>’ has incomplete type
18 | for (auto [L, R, C]:cur) if (r>=L && l<=R) z+=C;
| ^~~~~~~~~
lasers2.cpp: In function ‘int main()’:
lasers2.cpp:28:35: error: no matching function for call to ‘std::vector<std::tuple<int, int, long long int> >::push_back(<brace-enclosed initializer list>)’
28 | rgt[R].push_back({L, R, C});
| ^
In file included from /usr/include/c++/9/vector:67,
from lasers2.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::tuple<int, int, long long int>; _Alloc = std::allocator<std::tuple<int, int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<