prog.cpp:112:2: error: stray ‘#’ in program
}#include <iostream>
^
prog.cpp:118:2: error: stray ‘#’ in program
}#include<bits/stdc++.h>
^
prog.cpp:112:3: error: ‘include’ does not name a type
}#include <iostream>
^~~~~~~
prog.cpp:115:10: error: ‘::main’ must return ‘int’
int main() {
^
prog.cpp: In function ‘int main()’:
prog.cpp:115:5: error: redefinition of ‘int main()’
int main() {
^~~~
prog.cpp:67:5: note: ‘int main()’ previously defined here
int main()
^~~~
prog.cpp: At global scope:
prog.cpp:118:3: error: ‘include’ does not name a type
}#include<bits/stdc++.h>
^~~~~~~
prog.cpp:133:15: error: redefinition of ‘std::__cxx11::string grid [55]’
string grid[55];
^
prog.cpp:16:8: note: ‘std::__cxx11::string grid [55]’ previously declared here
string grid[55];
^~~~
prog.cpp:137:5: error: redefinition of ‘long long int h’
int h,w;
^
prog.cpp:20:5: note: ‘long long int h’ previously declared here
int h,w;
^
prog.cpp:137:7: error: redefinition of ‘long long int w’
int h,w;
^
prog.cpp:20:7: note: ‘long long int w’ previously declared here
int h,w;
^
prog.cpp: In function ‘bool isvalid(long long int, long long int)’:
prog.cpp:139:7: error: redefinition of ‘bool isvalid(long long int, long long int)’
bool isvalid(int i,int j)
^~~~~~~
prog.cpp:22:7: note: ‘bool isvalid(long long int, long long int)’ previously defined here
bool isvalid(int i,int j)
^~~~~~~
prog.cpp: At global scope:
prog.cpp:146:18: error: redefinition of ‘long long int height [55][55]’
int height[55][55];
^
prog.cpp:29:5: note: ‘long long int height [55][55]’ previously declared here
int height[55][55];
^~~~~~
prog.cpp: In function ‘long long int dfs(long long int, long long int)’:
prog.cpp:148:5: error: redefinition of ‘long long int dfs(long long int, long long int)’
int dfs(int n,int m)
^~~
prog.cpp:31:5: note: ‘long long int dfs(long long int, long long int)’ previously defined here
int dfs(int n,int m)
^~~
prog.cpp: In function ‘int main()’:
prog.cpp:184:5: error: redefinition of ‘int main()’
int main()
^~~~
prog.cpp:67:5: note: ‘int main()’ previously defined here
int main()
^~~~