quality.cpp: In function 'long long int check(long long int)':
quality.cpp:11:25: error: 'n' was not declared in this scope
11 | for(int i = 0; i <= n; i++){
| ^
quality.cpp:12:29: error: 'm' was not declared in this scope
12 | for(int j = 0; j <= m; j++){
| ^
quality.cpp:16:25: error: 'n' was not declared in this scope
16 | for(int i = 1; i <= n; i++){
| ^
quality.cpp:17:29: error: 'm' was not declared in this scope
17 | for(int j = 1; j <= m; j++){
| ^
quality.cpp:18:74: error: 'a' was not declared in this scope
18 | pref[i][j] = pref[i-1][j] + pref[i][j-1] - pref[i-1][j-1] + (a[i][j] <= x ? 1 : -1);
| ^
quality.cpp:24:14: error: 'h' was not declared in this scope
24 | ll mx = -h*w;
| ^
quality.cpp:24:16: error: 'w' was not declared in this scope
24 | ll mx = -h*w;
| ^
quality.cpp:25:35: error: 'n' was not declared in this scope
25 | for(int x1 = 1, x2 = h; x2 <= n; x1++, x2++){
| ^
quality.cpp:26:39: error: 'm' was not declared in this scope; did you mean 'mx'?
26 | for(int y1 = 1, y2 = w; y2 <= m; y1++, y2++){
| ^
| mx
quality.cpp: In function 'int rectangle(int, int, int, int, int (*)[3001])':
quality.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
37 | }
| ^