/in/foo.cc: In function 'int main()':
/in/foo.cc:64:84: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
printf("now(%d,%d) ans(%d,%d)=%d rand(%d,%d)=%d\n",nx,ny,ansx,ansy,ans,tx,ty,num);
^
/in/foo.cc:64:84: warning: format '%d' expects argument of type 'int', but argument 9 has type 'long long int' [-Wformat=]
/in/foo.cc: In function 'long long int calc(int, int)':
/in/foo.cc:16:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ans;
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:45:5: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
ans=calc(nx,ny);
~~~^~~~~~~~~~~~
/in/foo.cc:61:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
else if (num==ans && ansx>tx) ansx=nx=tx,ansy=ny=ty;
^~
/in/foo.cc:47:43: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("%lld %lld\n",calc(1,1),calc(4,4));
^
/in/foo.cc:47:43: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]