fish.cpp:16:41: error: expected ',' or '...' before 'X'
16 | int64_t max_weights(int N, int M, int[] X, int[] Y, int[] W) {
| ^
fish.cpp: In function 'int64_t max_weights(int, int, int*)':
fish.cpp:18:14: error: 'm' was not declared in this scope
18 | fore(i,0,m) {
| ^
fish.cpp:5:47: note: in definition of macro 'fore'
5 | #define fore(i, l, r) for(int i=int(l); i<int(r); i++)
| ^
fish.cpp:19:12: error: 'x' was not declared in this scope
19 | if(x[i] % 2)
| ^
fish.cpp:21:12: error: 'x' was not declared in this scope
21 | if(x[i] > 1)
| ^
fish.cpp:26:18: error: 'm' was not declared in this scope
26 | fore(i,0,m)
| ^
fish.cpp:5:47: note: in definition of macro 'fore'
5 | #define fore(i, l, r) for(int i=int(l); i<int(r); i++)
| ^
fish.cpp:27:18: error: 'w' was not declared in this scope
27 | ans+=w[i];
| ^
fish.cpp:30:18: error: 'm' was not declared in this scope
30 | fore(i,0,m) {
| ^
fish.cpp:5:47: note: in definition of macro 'fore'
5 | #define fore(i, l, r) for(int i=int(l); i<int(r); i++)
| ^
fish.cpp:31:16: error: 'x' was not declared in this scope
31 | if(x[i] == 0)
| ^
fish.cpp:32:23: error: 'w' was not declared in this scope
32 | sum1+=w[i];
| ^
fish.cpp:34:23: error: 'w' was not declared in this scope
34 | sum2+=w[i];
| ^
fish.cpp:38:20: error: 'n' was not declared in this scope
38 | int64_t dp[n+5];
| ^
fish.cpp:39:16: error: 'dp' was not declared in this scope
39 | memset(dp,0,sizeof dp);
| ^~
fish.cpp:41:16: error: 'grid' was not declared in this scope
41 | memset(grid,0,sizeof grid);
| ^~~~
fish.cpp:42:18: error: 'm' was not declared in this scope
42 | fore(i,0,m)
| ^
fish.cpp:5:47: note: in definition of macro 'fore'
5 | #define fore(i, l, r) for(int i=int(l); i<int(r); i++)
| ^
fish.cpp:43:18: error: 'x' was not declared in this scope
43 | grid[x[i]] = w[i];
| ^
fish.cpp:43:26: error: 'w' was not declared in this scope
43 | grid[x[i]] = w[i];
| ^