answer.code:5:10: error: wrong number of template arguments (1, should be 2)
5 | array<int>distribute_candies(int[] c, int[] l, int[] r, int[] v){
| ^
In file included from /usr/include/c++/13/bits/memory_resource.h:47,
from /usr/include/c++/13/string:58,
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/tuple:2005:45: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’
2005 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
answer.code:5:36: error: expected ‘,’ or ‘...’ before ‘c’
5 | array<int>distribute_candies(int[] c, int[] l, int[] r, int[] v){
| ^
answer.code: In function ‘int distribute_candies(int*)’:
answer.code:7:16: error: ‘c’ was not declared in this scope
7 | for(auto i:c){
| ^
answer.code:10:15: error: ‘v’ was not declared in this scope
10 | for(int i:v){
| ^
answer.code:18:13: error: ‘l’ was not declared in this scope
18 | arr[l[i]]+=v[i];
| ^
answer.code:18:20: error: ‘v’ was not declared in this scope
18 | arr[l[i]]+=v[i];
| ^
answer.code:19:13: error: ‘r’ was not declared in this scope
19 | arr[r[i]+1]-=v[i];
| ^
answer.code:25:27: error: ‘c’ was not declared in this scope
25 | arr[i]=min(arr[i],c[i]);
| ^
answer.code:28:12: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
28 | return arr;
| ^~~
| |
| int*