stones.cpp:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
58 | main(){
| ^~~~
stones.cpp: In function 'void fopn(std::string)':
stones.cpp:13:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | freopen((name+".in").c_str(),"r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stones.cpp:14:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | freopen((name+".out").c_str(),"w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stones.cpp: In function 'void solve()':
stones.cpp:40:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
40 | ar[i][k]='-';
| ~~~~~~~^
stones.cpp:18:6: note: at offset 0 to object 'ar' with size 1010025 declared here
18 | char ar[1005][1005];
| ^~