specialg.cpp: In function 'int main()':
specialg.cpp:27:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
27 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
specialg.cpp:29:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | scanf("%d", &nxt[i]);
| ~~~~~^~~~~~~~~~~~~~~
specialg.cpp:33:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
33 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
specialg.cpp:35:27: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
35 | int t, v, u; scanf("%d%d", &t, &v);
| ~~~~~^~~~~~~~~~~~~~~~
specialg.cpp:38:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
38 | scanf("%d", &u);
| ~~~~~^~~~~~~~~~