sortbooks.cpp: In function 'int main()':
sortbooks.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
7 | scanf("%d %d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~~
sortbooks.cpp:12:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | for (int i=1; i<=n; i++) scanf("%d", &w[i]);
| ~~~~~^~~~~~~~~~~~~
sortbooks.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | scanf("%d %d %d", &l, &r, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~