foo.cc: In function 'int main()':
foo.cc:46:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
46 | cost=(nd==dd||x==sx&&y==sy)?0:1;
| ~~~~~^~~~~~~
foo.cc:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
21 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:24:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
24 | scanf("%d",&s[i][j]);
| ~~~~~^~~~~~~~~~~~~~~
foo.cc:25:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
25 | scanf("%d%d%d%d",&sx,&sy,&bx,&by);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务