fish.cpp:4:43: error: expected ',' or '...' before 'X'
4 | long long max_weights(int N, int M, int[] X, int[] Y, int[] W){
| ^
fish.cpp: In function 'long long int max_weights(int, int, int*)':
fish.cpp:6:40: error: 'X' was not declared in this scope
6 | for(int i = 0; i < M; i++) st1 &= (X[i]%2==0);
| ^
fish.cpp:8:40: error: 'X' was not declared in this scope
8 | for(int i = 0; i < M; i++) st2 &= (X[i]<=1);
| ^
fish.cpp:10:40: error: 'Y' was not declared in this scope
10 | for(int i = 0; i < M; i++) st3 &= (Y[i]==0);
| ^
fish.cpp:14:20: error: 'W' was not declared in this scope
14 | ans += W[i];
| ^
fish.cpp:21:17: error: 'X' was not declared in this scope
21 | if (X[i] == 0) e += W[i];
| ^
fish.cpp:21:33: error: 'W' was not declared in this scope
21 | if (X[i] == 0) e += W[i];
| ^
fish.cpp:22:23: error: 'W' was not declared in this scope
22 | else o += W[i];
| ^
fish.cpp:28:16: error: 'W' was not declared in this scope
28 | A[0] = W[0];
| ^
fish.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
35 | }
| ^