ufo.cpp: In function 'void solve()':
ufo.cpp:21:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d %d %d", &n, &m, &r, &k, &p);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ufo.cpp:25:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d ", &a[i][j]);
~~~~~^~~~~~~~~~~~~~~~~
ufo.cpp:31:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c %d %d", &c, &x, &h);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ufo.cpp:34:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c %d %d\n", &c, &x, &h);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ufo.cpp: In function 'int main()':
ufo.cpp:8:19: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
#define in freopen("ufo.in", "r", stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ufo.cpp:97:5: note: in expansion of macro 'in'
in; out; // cin >> TN;
^~
ufo.cpp:9:20: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
#define out freopen("ufo.out", "w", stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ufo.cpp:97:9: note: in expansion of macro 'out'
in; out; // cin >> TN;
^~~