joi2019_ho_t1.cpp:4:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
joi2019_ho_t1.cpp: In function 'int main()':
joi2019_ho_t1.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld",&n,&m);
~~~~~^~~~~~~~~~~~~~~~~~
joi2019_ho_t1.cpp:10:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %c",&grid[i][j]);
~~~~~^~~~~~~~~~~~~~~~~~~