foo.cc: In function 'int main()':
foo.cc:32:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | int cost=(nd==d||x==sx&&y==sy)?0:1;
| ~~~~~^~~~~~~
foo.cc:18:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:20:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
20 | for(int j=1; j<=m; j++) scanf("%d",&s[i][j]);
| ~~~~~^~~~~~~~~~~~~~~
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%d%d",&sx,&sy,&ex,&ey);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务