Wrong Answer
foo.cc: In function 'int main()': foo.cc:64: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:67:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&x,&y); ~~~~~^~~~~~~~~~~~~~