foo.cpp:108:11: error: redefinition of 'int f [30][30]'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:5: note: 'int f [30][30]' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:108:27: error: redefinition of 'int num [30][30][30][30]'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:13: note: 'int num [30][30][30][30]' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:108:29: error: redefinition of 'int t'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:29: note: 'int t' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:108:31: error: redefinition of 'int n'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:31: note: 'int n' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:108:33: error: redefinition of 'int m'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:33: note: 'int m' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:108:41: error: redefinition of 'int a [30][30]'
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:9:35: note: 'int a [30][30]' previously declared here
int f[N][N],num[N][N][N][N],t,n,m,a[N][N];
^
foo.cpp:109:6: error: redefinition of 'bool flag'
bool flag=0;
^
foo.cpp:10:6: note: 'bool flag' previously defined here
bool flag=0;
^
foo.cpp: In function 'void dfs()':
foo.cpp:111:6: error: redefinition of 'void dfs()'
void dfs(){
^
foo.cpp:12:6: note: 'void dfs()' previously defined here
void dfs(){
^
foo.cpp: In function 'int main()':
foo.cpp:163:5: error: redefinition of 'int main()'
int main(){
^
foo.cpp:64:5: note: 'int main()' previously defined here
int main(){
^