joiris.cpp: In function 'int main()':
joiris.cpp:37:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
37 | else if(i+3<N&&all[i+1]==1&&all[i+2]==0&all[i+3]==1)
| ~~~~~~~~^~~
joiris.cpp:71:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wformat=]
71 | printf("%d\n",ans.size());
| ~^ ~~~~~~~~~~
| | |
| int std::vector<std::pair<int, int> >::size_type {aka long unsigned int}
| %ld
joiris.cpp:11:17: warning: unused variable 'ok' [-Wunused-variable]
11 | int N,M,t=0,ok,small,i,st;
| ^~
joiris.cpp:11:28: warning: unused variable 'st' [-Wunused-variable]
11 | int N,M,t=0,ok,small,i,st;
| ^~
joiris.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
12 | scanf("%d %d",&N,&M);
| ~~~~~^~~~~~~~~~~~~~~
joiris.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%d",&all[i]);
| ~~~~~^~~~~~~~~~~~~~