0_0_17166844_30345.cpp:61:9: error: redefinition of 'int n'
int cas,n,m,c1,c2,r1,r2,k;
^
0_0_17166844_30345.cpp:13:17: note: 'int n' previously declared here
int ax,ay,rx,ry,n,m;
^
0_0_17166844_30345.cpp:61:11: error: redefinition of 'int m'
int cas,n,m,c1,c2,r1,r2,k;
^
0_0_17166844_30345.cpp:13:19: note: 'int m' previously declared here
int ax,ay,rx,ry,n,m;
^
0_0_17166844_30345.cpp:62:19: error: redefinition of 'char maze [205][205]'
char maze[205][205];
^
0_0_17166844_30345.cpp:11:6: note: 'char maze [205][205]' previously declared here
char maze[205][205];
^
0_0_17166844_30345.cpp:64:8: error: redefinition of 'struct pos'
struct pos{
^
0_0_17166844_30345.cpp:5:8: error: previous definition of 'struct pos'
struct pos{
^
0_0_17166844_30345.cpp: In function 'bool bfs()':
0_0_17166844_30345.cpp:70:10: error: ambiguating new declaration of 'bool bfs()'
bool bfs(){
^
0_0_17166844_30345.cpp:15:5: note: old declaration 'int bfs()'
int bfs(){
^
0_0_17166844_30345.cpp:82:14: error: 'struct pos' has no member named 'r'
int nr=tp.r+dr[i],nc=tp.c+dc[i];
^
0_0_17166844_30345.cpp:84:17: error: 'nc' was not declared in this scope
while(nr>=1&&nc>=1&&nr<=m&&nc<=n&&maze[nr][nc]!='*'&&(dir[nr][nc]==-1||dir[tp.r][tp.c]+1<=dir[nr][nc])){
^
0_0_17166844_30345.cpp:84:82: error: 'struct pos' has no member named 'r'
while(nr>=1&&nc>=1&&nr<=m&&nc<=n&&maze[nr][nc]!='*'&&(dir[nr][nc]==-1||dir[tp.r][tp.c]+1<=dir[nr][nc])){
^
0_0_17166844_30345.cpp:84:88: error: 'struct pos' has no member named 'c'
while(nr>=1&&nc>=1&&nr<=m&&nc<=n&&maze[nr][nc]!='*'&&(dir[nr][nc]==-1||dir[tp.r][tp.c]+1<=dir[nr][nc])){
^
0_0_17166844_30345.cpp:85:24: error: 'struct pos' has no member named 'r'
dir[nr][nc]=dir[tp.r][tp.c]+1;
^
0_0_17166844_30345.cpp:85:30: error: 'struct pos' has no member named 'c'
dir[nr][nc]=dir[tp.r][tp.c]+1;
^
0_0_17166844_30345.cpp: In function 'int main()':
0_0_17166844_30345.cpp:100:5: error: redefinition of 'int main()'
int main(){
^
0_0_17166844_30345.cpp:38:5: note: 'int main()' previously defined here
int main(){
^
0_0_17166844_30345.cpp: At global scope:
0_0_17166844_30345.cpp:115:8: error: redefinition of 'struct pos'
struct pos{int x,y,z;pos(int a,int b,int c){x=a,y=b,z=c;}};
^
0_0_17166844_30345.cpp:5:8: error: previous definition of 'struct pos'
struct pos{
^
0_0_17166844_30345.cpp:116:5: error: redefinition of 'int n'
int n,p1,p2,p3;
^
0_0_17166844_30345.cpp:13:17: note: 'int n' previously declared here
int ax,ay,rx,ry,n,m;
^
0_0_17166844_30345.cpp: In function 'int bfs()':
0_0_17166844_30345.cpp:122:5: error: redefinition of 'int bfs()'
int bfs(){
^
0_0_17166844_30345.cpp:15:5: note: 'int bfs()' previously defined here
int bfs(){
^
0_0_17166844_30345.cpp:125:21: error: no matching function for call to 'pos::pos(int&, int&, int&)'
q.push(pos(p1,p2,p3));
^
0_0_17166844_30345.cpp:125:21: note: candidates are:
0_0_17166844_30345.cpp:8:2: note: pos::pos(int, int)
pos(int a,int b){x=a,y=b;}
^
0_0_17166844_30345.cpp:8:2: note: candidate expects 2 arguments, 3 provided
0_0_17166844_30345.cpp:7:2: note: pos::pos()
pos(){}
^
0_0_17166844_30345.cpp:7:2: note: candidate expects 0 arguments, 3 provided
0_0_17166844_30345.cpp:5:8: note: constexpr pos::pos(const pos&)
struct pos{
^
0_0_17166844_30345.cpp:5:8: note: candidate expects 1 argument, 3 provided
0_0_17166844_30345.cpp:5:8: note: constexpr pos::pos(pos&&)
0_0_17166844_30345.cpp:5:8: note: candidate expects 1 argument, 3 provided
0_0_17166844_30345.cpp:131:23: error: 'struct pos' has no member named 'z'
if(p.x==p.y&&p.y==p.z)return vis[p.x][p.y][p.z]-1;
^
0_0_17166844_30345.cpp:131:48: error: 'struct pos' has no member named 'z'
if(p.x==p.y&&p.y==p.z)return vis[p.x][p.y][p.z]-1;
^
0_0_17166844_30345.cpp:134:28: error: 'struct pos' has no member named 'z'
if(map[p.x][p.y]==map[p.z][i]&&!vis[p.x][p.y][i]){
^
0_0_17166844_30345.cpp:135:38: error: 'struct pos' has no member named 'z'
vis[p.x][p.y][i]=vis[p.x][p.y][p.z]+1;
^
0_0_17166844_30345.cpp:136:25: error: no matching function for call to 'pos::pos(int&, int&, int&)'
q.push(pos(p.x,p.y,i));
^
0_0_17166844_30345.cpp:136:25: note: candidates are:
0_0_17166844_30345.cpp:8:2: note: pos::pos(int, int)
pos(int a,int b){x=a,y=b;}
^
0_0_17166844_30345.cpp:8:2: note: candidate expects 2 arguments, 3 provided
0_0_17166844_30345.cpp:7:2: note: pos::pos()
pos(){}
^
0_0_17166844_30345.cpp:7:2: note: candidate expects 0 arguments, 3 provided
0_0_17166844_30345.cpp:5:8: note: constexpr pos::pos(const pos&)
struct pos{
^
0_0_17166844_30345.cpp:5:8: note: candidate expects 1 argument, 3 provided
0_0_17166844_30345.cpp:5:8: note: constexpr pos::pos(pos&&)
0_0_17166844_30345.cpp:5:8: note: candidate expects 1 argument, 3 provided
0_0_17166844_30345.cpp:138:13: error: 'struct pos' has no member named 'z'
if(map[p.z][p.x]==map[p.y][i]&&!vis[p.x][i][p.z]){
^
0_0_17166844_30345.cpp:138:50: error: 'struct pos' has no member named 'z'
if(map[p.z][p.x]==map[p.y][i]&&!vis[p.x][i][p.z]){
^
0_0_17166844_30345.cpp:139:19: error: 'struct pos' has no member named 'z'
vis[p.x][i][p.z]=vis[p.x][p.y][p.z]+1;
^
0_0_17166844_30345.cpp:139:38: error: 'struct pos' has no member named 'z'
vis[p.x][i][p.z]=vis[p.x][p.y][p.z]+1;
^
0_0_17166844_30345.cpp:140:24: error: 'struct pos' has no member named 'z'
q.push(pos(p.x,i,p.z));
^
0_0_17166844_30345.cpp:142:18: error: 'struct pos' has no member named 'z'
if(map[p.y][p.z]==map[p.x][i]&&!vis[i][p.y][p.z]){
^
0_0_17166844_30345.cpp:142:50: error: 'struct pos' has no member named 'z'
if(map[p.y][p.z]==map[p.x][i]&&!vis[i][p.y][p.z]){
^
0_0_17166844_30345.cpp:143:19: error: 'struct pos' has no member named 'z'
vis[i][p.y][p.z]=vis[p.x][p.y][p.z]+1;
^
0_0_17166844_30345.cpp:143:38: error: 'struct pos' has no member named 'z'
vis[i][p.y][p.z]=vis[p.x][p.y][p.z]+1;
^
0_0_17166844_30345.cpp:144:24: error: 'struct pos' has no member named 'z'
q.push(pos(i,p.y,p.z));
^
0_0_17166844_30345.cpp: In function 'int main()':
0_0_17166844_30345.cpp:151:5: error: redefinition of 'int main()'
int main(){
^
0_0_17166844_30345.cpp:38:5: note: 'int main()' previously defined here
int main(){
^
0_0_17166844_30345.cpp: At global scope:
0_0_17166844_30345.cpp:170:8: error: redefinition of 'struct pos'
struct pos{
^
0_0_17166844_30345.cpp:5:8: error: previous definition of 'struct pos'
struct pos{
^
0_0_17166844_30345.cpp:174:5: error: redefinition of 'int n'
int n,m,p,t,sr,sc,er,ec;
^
0_0_17166844_30345.cpp:13:17: note: 'int n' previously declared here
int ax,ay,rx,ry,n,m;
^
0_0_17166844_30345.cpp:174:7: error: redefinition of 'int m'
int n,m,p,t,sr,sc,er,ec;
^
0_0_17166844_30345.cpp:13:19: note: 'int m' previously declared here
int ax,ay,rx,ry,n,m;
^
0_0_17166844_30345.cpp:174:9: error: conflicting declaration 'int p'
int n,m,p,t,sr,sc,er,ec;
^
0_0_17166844_30345.cpp:9:2: note: previous declaration as 'pos p'
}p;
^
0_0_17166844_30345.cpp:175:20: error: conflicting declaration 'bool vis [82][82][82]'
bool vis[82][82][82];
^
0_0_17166844_30345.cpp:118:5: note: previous declaration as 'int vis [60][60][60]'
int vis[60][60][60];
^
0_0_17166844_30345.cpp:176:8: error: redefinition of 'int dr []'
int dr[]={0,0,1,-1},dc[]={1,-1,0,0};
^
0_0_17166844_30345.cpp:68:5: note: 'int dr [4]' previously defined here
int dr[]={1,-1,0,0};
^
0_0_17166844_30345.cpp:176:24: error: redefinition of 'int dc []'
int dr[]={0,0,1,-1},dc[]={1,-1,0,0};
^
0_0_17166844_30345.cpp:69:5: note: 'int dc [4]' previously defined here
int dc[]={0,0,1,-1};
^
0_0_17166844_30345.cpp:177:17: error: conflicting declaration 'char maze [82][82]'
char maze[82][82];
^
0_0_17166844_30345.cpp:11:6: note: previous declaration as 'char maze [205][205]'
char maze[205][205];
^
0_0_17166844_30345.cpp: In function 'int bfs()':
0_0_17166844_30345.cpp:179:5: error: redefinition of 'int bfs()'
int bfs(){
^
0_0_17166844_30345.cpp:15:5: note: 'int bfs()' previously defined here
int bfs(){
^
0_0_17166844_30345.cpp:182:22: error: no matching function for call to 'pos::pos(int&, int&, pos&, int)'
q.push(pos(sr,sc,p,0));
^
0_0_17166844_30345.cpp:182:22: note: candidates are:
|