flood.cpp:87:11: error: redefinition of 'const int maxn'
const int maxn = 2e5 + 5;
^~~~
flood.cpp:17:11: note: 'const int maxn' previously defined here
const int maxn = 2e5 + 5;
^~~~
flood.cpp:88:5: error: redefinition of 'int n'
int n , m;
^
flood.cpp:18:5: note: 'int n' previously declared here
int n , m;
^
flood.cpp:88:9: error: redefinition of 'int m'
int n , m;
^
flood.cpp:18:9: note: 'int m' previously declared here
int n , m;
^
flood.cpp:89:14: error: redefinition of 'int d [200005][4]'
int d[maxn][4];
^
flood.cpp:19:5: note: 'int d [200005][4]' previously declared here
int d[maxn][4];
^
flood.cpp:90:10: error: redefinition of 'ii a [200005]'
ii a[maxn];
^
flood.cpp:20:4: note: 'ii a [200005]' previously defined here
ii a[maxn];
^
flood.cpp:91:13: error: redefinition of 'std::vector<int> res'
vector<int> res;
^~~
flood.cpp:21:13: note: 'std::vector<int> res' previously declared here
vector<int> res;
^~~
flood.cpp:92:10: error: redefinition of 'ii b [200005]'
ii b[maxn];
^
flood.cpp:22:4: note: 'ii b [200005]' previously defined here
ii b[maxn];
^
flood.cpp: In function 'int dir(int, int)':
flood.cpp:94:5: error: redefinition of 'int dir(int, int)'
int dir(int x , int y){
^~~
flood.cpp:24:5: note: 'int dir(int, int)' previously defined here
int dir(int x , int y){
^~~
flood.cpp: At global scope:
flood.cpp:99:14: error: redefinition of 'bool vis [200005]'
bool vis[maxn];
^
flood.cpp:29:6: note: 'bool vis [200005]' previously declared here
bool vis[maxn];
^~~
flood.cpp: In function 'int dfs(int, int)':
flood.cpp:101:5: error: redefinition of 'int dfs(int, int)'
int dfs(int u , int dir){
^~~
flood.cpp:31:5: note: 'int dfs(int, int)' previously defined here
int dfs(int u , int dir){
^~~
flood.cpp: In function 'int main()':
flood.cpp:120:5: error: redefinition of 'int main()'
int main()
^~~~
flood.cpp:50:5: note: 'int main()' previously defined here
int main()
^~~~
flood.cpp: In function 'int main()':
flood.cpp:55:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".INP", "r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
flood.cpp:56:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".OUT", "w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
flood.cpp: In function 'int main()':
flood.cpp:125:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".INP", "r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
flood.cpp:126:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".OUT", "w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~