Problem candles
User asruby
Submission Time 2023-12-01 16:35:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candles.cpp: In function ‘int main()’:
candles.cpp:12:16: error: ‘arr’ was not declared in this scope
12 | cin >> arr[i]
| ^~~
candles.cpp:17:7: error: expected ‘)’ before ‘in’
17 | if (0 in candles == True)
| ~ ^~~
| )
candles.cpp:21:23: error: no matching function for call to ‘sort(long long int [N])’
21 | sorted = sort(candles)
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from candles.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
candles.cpp:21:23: note: