stove.cpp: In function 'int main()':
stove.cpp:19:37: error: 'constvector' has not been declared
19 | auto calculate_total_time = [&](constvector<int>&turn_on_times) {
| ^~~~~~~~~~~
stove.cpp:19:48: error: expected ',' or '...' before '<' token
19 | auto calculate_total_time = [&](constvector<int>&turn_on_times) {
| ^
stove.cpp: In lambda function:
stove.cpp:25:33: error: 'turn_on_times' was not declared in this scope; did you mean 'turn_on_index'?
25 | if (turn_on_index < turn_on_times.size() && arrival_times[guest_index] >= turn_on_times[turn_on_index]) {
| ^~~~~~~~~~~~~
| turn_on_index
stove.cpp:48:32: error: 'turn_on_times' was not declared in this scope; did you mean 'turn_on_index'?
48 | if(turn_on_index < turn_on_times.size()){
| ^~~~~~~~~~~~~
| turn_on_index
stove.cpp: In function 'int main()':
stove.cpp:59:13: error: 'intindex' has not been declared
59 | [&](intindex,intstart) {
| ^~~~~~~~
stove.cpp:59:22: error: 'intstart' has not been declared
59 | [&](intindex,intstart) {
| ^~~~~~~~
stove.cpp: In lambda function:
stove.cpp:60:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
60 | if (index == k) {
| ~~~~~~^~~~
stove.cpp:65:64: error: no match for call to '(main()::<lambda(int)>) (std::vector<int>&)'
65 | long long current_total_time = calculate_total_time(turn_on_times);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
stove.cpp:19:33: note: candidate: 'main()::<lambda(int)>'
19 | auto calculate_total_time = [&](constvector<int>&turn_on_times) {
| ^
stove.cpp:19:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'int'
stove.cpp:74:22: error: 'start' was not declared in this scope
74 | for (int i = start; i <= arrival_times[n-1]; ++i) {
| ^~~~~
stove.cpp:75:26: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
75 | turn_on_times[index] = i;
| ^
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from stove.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:1043:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1043 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1043:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1043 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1061:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1061:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
stove.cpp:76:41: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
76 | generate_combinations(index + 1, i);
| ~~~~~~^~~