sortbooks.cpp: In function 'int main()':
sortbooks.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
sortbooks.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
sortbooks.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
sortbooks.cpp:18:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d%d%d", &l[i], &r[i], &x[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~