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