Problem dogfood
User qwertyuiop
Submission Time 2026-05-29 15:59:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dogfood.cpp: In function ‘int main()’:
dogfood.cpp:45:18: error: ‘i’ was not declared in this scope
45 | cin >> a[i];
| ^
dogfood.cpp:46:32: error: invalid initialization of reference of type ‘std::vector<long long int>&’ from expression of type ‘long long int [N]’
46 | cout << maxSubarraySum(a, N);
| ^
dogfood.cpp:21:33: note: in passing argument 1 of ‘long long int maxSubarraySum(std::vector<long long int>&)’
21 | int maxSubarraySum(vector<int> &arr) {
| ~~~~~~~~~~~~~^~~