Problem prefixsums
User dieunq1309
Submission Time 2023-04-27 17:08:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:22:23: error: invalid conversion from ‘long long int*’ to ‘long int*’ [-fpermissive]
22 | long ans = arraysum(array, l-1) - arraysum(array, r);
| ^~~~~
| |
| long long int*
prefixsums.cpp:3:19: note: initializing argument 1 of ‘int arraysum(long int*, long int)’
3 | int arraysum(long a[], long n)
| ~~~~~^~~
prefixsums.cpp:22:46: error: invalid conversion from ‘long long int*’ to ‘long int*’ [-fpermissive]
22 | long ans = arraysum(array, l-1) - arraysum(array, r);
| ^~~~~
| |
| long long int*
prefixsums.cpp:3:19: note: initializing argument 1 of ‘int arraysum(long int*, long int)’
3 | int arraysum(long a[], long n