foo.cpp: In function 'int main()':
foo.cpp:13:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d%d",&r,&c);
^
foo.cpp:13:20: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
foo.cpp:17:23: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d",&m[i][j]);
^
foo.cpp:24:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%d",ans);
^
foo.cpp: In function 'int search(int, int)':
foo.cpp:30:8: warning: unused variable 'j' [-Wunused-variable]
int i,j,tmp,nx,ny;
^