foo.cc: In function 'int main()':
foo.cc:44:42: warning: iteration 501 invokes undefined behavior [-Waggressive-loop-optimizations]
44 | passlength[i][j] = -1;
| ~~~~~~~~~~~~~~~~~^~~~
foo.cc:42:32: note: within this loop
42 | for(int j = 0;j<505;j++)
| ~^~~~
foo.cc:44:42: warning: iteration 501 invokes undefined behavior [-Waggressive-loop-optimizations]
44 | passlength[i][j] = -1;
| ~~~~~~~~~~~~~~~~~^~~~
foo.cc:40:22: note: within this loop
40 | for(int i=0;i<505;i++)
| ~^~~~
foo.cc:66:25: warning: 'maxpath' may be used uninitialized in this function [-Wmaybe-uninitialized]
66 | cout<<maxpath + 1;
| ^
[Hydro](https://hydro.ac)提供评测服务