walls.cpp: In function 'void solve1()':
walls.cpp:20:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<P.size(); i++){
~^~~~~~~~~
walls.cpp: In function 'int main()':
walls.cpp:44:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &N, &M);
~~~~~^~~~~~~~~~~~~~~~
walls.cpp:47:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &tmp.a, &tmp.b); v.push_back(tmp);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
walls.cpp:51:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &x); P.push_back(x);
~~~~~^~~~~~~~~~