segments.cpp: In function 'int main()':
segments.cpp:34:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | scanf("%d%d", &q, &t);
| ~~~~~^~~~~~~~~~~~~~~~
segments.cpp:38:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
38 | scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
segments.cpp:41:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
41 | scanf("%d%d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
segments.cpp:49:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
49 | scanf("%d", &need);
| ~~~~~^~~~~~~~~~~~~
segments.cpp:54:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
54 | scanf("%d%d%d", &a, &b, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~