street_lamps.cpp: In function 'int main()':
street_lamps.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | scanf("%d%d\n", &n, &q);
| ~~~~~^~~~~~~~~~~~~~~~~~
street_lamps.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%c", &chr);
| ~~~~~^~~~~~~~~~~~
street_lamps.cpp:22:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | scanf("\n%s ", str);
| ~~~~~^~~~~~~~~~~~~~
street_lamps.cpp:26:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
26 | scanf("%d", &t);
| ~~~~~^~~~~~~~~~
street_lamps.cpp:36:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | scanf("%d%d", &l, &r);
| ~~~~~^~~~~~~~~~~~~~~~