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