street_lamps.cpp: In function 'int main()':
street_lamps.cpp:15:19: warning: format '%s' expects argument of type 'char*', but argument 4 has type 'char (*)[1010]' [-Wformat=]
15 | scanf("%d %d %s",&n,&q,&s);
| ~^ ~~
| | |
| char* char (*)[1010]
street_lamps.cpp:23:17: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[1010]' [-Wformat=]
23 | scanf("%s",&inp);
| ~^ ~~~~
| | |
| | char (*)[1010]
| char*
street_lamps.cpp:14:15: warning: unused variable 'm' [-Wunused-variable]
14 | int i,j,n,m,q,f,t,cst,cou,su,k;
| ^
street_lamps.cpp:15:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d %d %s",&n,&q,&s);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
street_lamps.cpp:23:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | scanf("%s",&inp);
| ~~~~~^~~~~~~~~~~
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",&f);
| ~~~~~^~~~~~~~~
street_lamps.cpp:33:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
33 | scanf("%d %d",&f,&t);
| ~~~~~^~~~~~~~~~~~~~~