segments.cpp: In function 'int main()':
segments.cpp:32:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | scanf("%d%d", &q, &t);
| ~~~~~^~~~~~~~~~~~~~~~
segments.cpp:36:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
segments.cpp:39:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
39 | scanf("%d%d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
segments.cpp:47:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
47 | scanf("%d", &need);
| ~~~~~^~~~~~~~~~~~~
segments.cpp:52:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
52 | scanf("%d%d%d", &a, &b, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~