ballmachine.cpp: In function 'int main()':
ballmachine.cpp:18:24: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | int n, q, rt; scanf("%d %d", &n, &q); LOG = 32 - __builtin_clz(n);
| ~~~~~^~~~~~~~~~~~~~~~~
ballmachine.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
20 | scanf("%d", &up[mn[i] = i][0]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ballmachine.cpp:28:28: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | int op, k, u; scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
ballmachine.cpp:30:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | scanf("%d", &k);
| ~~~~~^~~~~~~~~~
ballmachine.cpp:33:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
33 | scanf("%d", &u); --u;
| ~~~~~^~~~~~~~~~
ballmachine.cpp:25:17: warning: 'rt' may be used uninitialized in this function [-Wmaybe-uninitialized]
25 | dfs(rt); efs(rt);
| ~~~^~~~