sortbooks.cpp: In function 'int main()':
sortbooks.cpp:9:5: error: 'ios_base' has not been declared
9 | ios_base::sync_with_stdio(false);
| ^~~~~~~~
sortbooks.cpp:10:5: error: 'cin' was not declared in this scope
10 | cin.tie(0);
| ^~~
sortbooks.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using namespace std;
sortbooks.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d %d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~~
sortbooks.cpp:18:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | for (int i=1; i<=n; i++) scanf("%d", &w[i]);
| ~~~~~^~~~~~~~~~~~~
sortbooks.cpp:22:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | scanf("%d %d %d", &l, &r, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~