Wrong Answer
foo.cc: In function 'int main()': foo.cc:65:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d%d",&n,&m,&a,&b); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ foo.cc:68:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&x,&y); ~~~~~^~~~~~~~~~~~~~