skyscraper.cpp: In function 'void sol()':
skyscraper.cpp:51:39: error: expected ']' before ')' token
51 | add(dp[(i&1)^1)][j + 1][p + a[i + 1] * 2][q], 1ll * dp[i&1][j][p][q] * (j + 1 - q) % mod);
| ^
| ]
skyscraper.cpp:51:39: error: invalid conversion from 'int (*)[10002][3]' to 'int' [-fpermissive]
51 | add(dp[(i&1)^1)][j + 1][p + a[i + 1] * 2][q], 1ll * dp[i&1][j][p][q] * (j + 1 - q) % mod);
| ~~~~~~~~~~^
| |
| int (*)[10002][3]
skyscraper.cpp:51:39: error: cannot bind rvalue '(int)((int (*)[10002][3])(& dp[((i & 1) ^ 1)]))' to 'int&'
skyscraper.cpp:19:15: note: in passing argument 1 of 'void add(int&, int)'
19 | void add(int& x, int y)
| ~~~~~^
skyscraper.cpp:53:39: error: expected ']' before ')' token
53 | add(dp[(i&1)^1)][j + 1][p + a[i + 1]][q + 1], 1ll * dp[i&1][j][p][q] * (2 - q) % mod);
| ^
| ]
skyscraper.cpp:53:39: error: invalid conversion from 'int (*)[10002][3]' to 'int' [-fpermissive]
53 | add(dp[(i&1)^1)][j + 1][p + a[i + 1]][q + 1], 1ll * dp[i&1][j][p][q] * (2 - q) % mod);
| ~~~~~~~~~~^
| |
| int (*)[10002][3]
skyscraper.cpp:53:39: error: cannot bind rvalue '(int)((int (*)[10002][3])(& dp[((i & 1) ^ 1)]))' to 'int&'
skyscraper.cpp:19:15: note: in passing argument 1 of 'void add(int&, int)'
19 | void add(int& x, int y)
| ~~~~~^
skyscraper.cpp:56:39: error: expected ']' before ')' token
56 | add(dp[(i&1)^1)][j][p - a[i + 1]][q + 1], 1ll * dp[i&1][j][p][q] * (2 - q) % mod);
| ^
| ]
skyscraper.cpp:56:39: error: invalid conversion from 'int (*)[10002][3]' to 'int' [-fpermissive]
56 | add(dp[(i&1)^1)][j][p - a[i + 1]][q + 1], 1ll * dp[i&1][j][p][q] * (2 - q) % mod);
| ~~~~~~~~~~^
| |
| int (*)[10002][3]
skyscraper.cpp:56:39: error: cannot bind rvalue '(int)((int (*)[10002][3])(& dp[((i & 1) ^ 1)]))' to 'int&'
skyscraper.cpp:19:15: note: in passing argument 1 of 'void add(int&, int)'
19 | void add(int& x, int y)
| ~~~~~^
skyscraper.cpp:58:39: error: expected ']' before ')' token
58 | add(dp[(i&1)^1)][j - 1][p - a[i + 1] * 2][q], 1ll * dp[i&1][j][p][q] * (j - 1) % mod);
| ^
| ]
skyscraper.cpp:58:39: error: invalid conversion from 'int (*)[10002][3]' to 'int' [-fpermissive]
58 | add(dp[(i&1)^1)][j - 1][p - a[i + 1] * 2][q], 1ll * dp[i&1][j][p][q] * (j - 1) % mod);
| ~~~~~~~~~~^
| |
| int (*)[10002][3]
skyscraper.cpp:58:39: error: cannot bind rvalue '(int)((int (*)[10002][3])(& dp[((i & 1) ^ 1)]))' to 'int&'
skyscraper.cpp:19:15: note: in passing argument 1 of 'void add(int&, int)'
19 | void add(int& x, int y)
| ~~~~~^
skyscraper.cpp: In function 'int main()':
skyscraper.cpp:75:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
75 | freopen(task ".inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
skyscraper.cpp:76:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
76 | freopen(task ".out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~