mizuyokan2.cpp: In function 'int solve(int, int)':
mizuyokan2.cpp:34:34: error: 'sp' was not declared in this scope
34 | for (int x=l,j=19;j>=0;j--) if (sp[x][j] <= r){
| ^~
mizuyokan2.cpp: In function 'int main()':
mizuyokan2.cpp:62:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
62 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
mizuyokan2.cpp:63:30: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
63 | for (int i=1;i<=n;i++) scanf("%d", a+i);
| ~~~~~^~~~~~~~~~~
mizuyokan2.cpp:68:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
68 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
mizuyokan2.cpp:71:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
71 | scanf("%d %d %d %d", &x, &y, &l, &r);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~