Problem squidzofrenzic
User justin271828
Submission Time 2023-06-11 18:15:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

squidzofrenzic.cpp: In function ‘int isvalid(int, int, int, int)’:
squidzofrenzic.cpp:7:22: error: ‘N’ was not declared in this scope
7 | for (int i = 0; i < N; i++) {
| ^
squidzofrenzic.cpp:8:25: error: ‘B’ was not declared in this scope
8 | if (partialarraysum + B[i] > a) {
| ^
squidzofrenzic.cpp:8:32: error: ‘a’ was not declared in this scope
8 | if (partialarraysum + B[i] > a) {
| ^
squidzofrenzic.cpp:9:19: error: ‘M’ was not declared in this scope
9 | if (M_sofar >= M) {
| ^
squidzofrenzic.cpp: In function ‘int main()’:
squidzofrenzic.cpp:42:21: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
42 | if (isvalid(N, M, B, a)) {
| ^
| |
| int*
squidzofrenzic.cpp:4:31: note: initial