Problem hallucinations
User god
Submission Time 2025-06-18 10:47:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hallucinations.cpp: In function ‘int main()’:
hallucinations.cpp:18:5: error: expected initializer before ‘psum’
18 | psum[0] = 0;
| ^~~~
hallucinations.cpp:21:9: error: ‘psum’ was not declared in this scope
21 | psum[i] == psum[i-1] + input[i]
| ^~~~
hallucinations.cpp:21:39: error: invalid types ‘int[int]’ for array subscript
21 | psum[i] == psum[i-1] + input[i]
| ^
hallucinations.cpp:26:18: error: ‘psum’ was not declared in this scope
26 | result = psum[end] - psum[start-1];
| ^~~~
hallucinations.cpp:32:9: error: break statement not within loop or switch
32 | break;
| ^~~~~
hallucinations.cpp:36:22: error: ‘psum’ was not declared in this scope
36 | result = psum[end] - psum[start-1];
| ^~~~