Problem dogfood
User qwertyuiop
Submission Time 2026-05-29 16:00:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dogfood.cpp: In function ‘int main()’:
dogfood.cpp:46:32: error: invalid initialization of reference of type ‘std::vector<int>&’ from expression of type ‘int [N]’
46 | cout << maxSubarraySum(a, N);
| ^
dogfood.cpp:20:33: note: in passing argument 1 of ‘int maxSubarraySum(std::vector<int>&)’
20 | int maxSubarraySum(vector<int> &arr) {
| ~~~~~~~~~~~~~^~~