foo.cc: In function 'int main()':
foo.cc:48:8: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("in.txt","r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:50:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&m);
~~~~~^~~~~~~~~~~~~~~
foo.cc:53:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&tre[i][j]);
~~~~~^~~~~~~~~~~~~~~~~