Problem | lunchbox |
---|---|
User | brat |
Submission Time | 2025-09-25 20:15:25 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:17:16: error: expected ‘;’ before ‘if’
17 | track+=arr[i]
| ^
| ;
18 | if (track <= n) {count++;}
| ~~
lunchbox.cpp:19:3: error: ‘else’ without a previous ‘if’
19 | else {cout << count; return 0;}
| ^~~~
lunchbox.cpp:19:17: error: reference to ‘count’ is ambiguous
19 | else {cout << count; return 0;}
| ^~~~~
In file included from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from lunchbox.cpp:1:
/usr/include/c++/9/pstl/glue_algorithm_defs.h:101:1: note: candidates are: ‘template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(