ballmachine.cpp: In function 'int kth_anc(int, int)':
ballmachine.cpp:19:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
19 | for(int j = LOG-1; j>=0; --j) if(k>>j&1) u = up[u][j]; return u;
| ^~~
ballmachine.cpp:19:60: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
19 | for(int j = LOG-1; j>=0; --j) if(k>>j&1) u = up[u][j]; return u;
| ^~~~~~
ballmachine.cpp: In function 'int main()':
ballmachine.cpp:22:24: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | int n, q, rt; scanf("%d %d", &n, &q); LOG = 32 - __builtin_clz(n);
| ~~~~~^~~~~~~~~~~~~~~~~
ballmachine.cpp:24:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
24 | scanf("%d", &u);
| ~~~~~^~~~~~~~~~
ballmachine.cpp:32:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
ballmachine.cpp:34:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | scanf("%d", &k);
| ~~~~~^~~~~~~~~~
ballmachine.cpp:37:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
37 | scanf("%d", &u); --u;
| ~~~~~^~~~~~~~~~
ballmachine.cpp:38:13: warning: 'rt' may be used uninitialized in this function [-Wmaybe-uninitialized]
38 | if(u == rt || sz < SZ[up[u][0]]){ puts("0"); --sz; continue;}
| ^~