Language: C++

#include<iostream>
#include<queue>
using namespace std;
struct l{
	int tx;
	int ty;
	int kx;
	int ky;
	int cnt;
};
queue<l> p;
int ps[50505050]={};
int main(){
	int x,y,tlx,tly,klx,kly,d[50][50],i,j,cl,tmx[4]={0,1,0,-1},tmy[4]={-1,0,1,0},kmx[4]={0,-1,0,1},kmy[4]={1,0,-1,0},k,z;
	l v;
	while(1){
		cin>>x>>y;
		if(x==0&&y==0)break;
		cin>>tlx>>tly;
		cin>>klx>>kly;
		for(i=0;i<y;i++){
			for(j=0;j<x;j++){
				cin>>d[i][j];
			}
		}
		v.tx=tlx-1;
		v.ty=tly-1;
		v.kx=klx-1;
		v.ky=kly-1;
		v.cnt=0;
		p.push(v);
		while(1){
			tlx=p.front().tx;
			tly=p.front().ty;
			klx=p.front().kx;
			kly=p.front().ky;
			cl=p.front().cnt;
			p.pop();
			if(tlx==klx&&tly==kly||cl>=100){
				while(!p.empty()){
					p.pop();
				}
				for(i=0;i<50505050;i++){
					ps[i]=0;
				}
				break;
			}
			if(ps[tlx*1000000+tly*10000+klx*100+kly]==1){
				if (!p.empty())
					continue;
				else
					break;
			}
			else{
				ps[tlx*1000000+tly*10000+klx*100+kly]=1;
			}
			for(i=0;i<4;i++){
				if(d[tly+tmy[i]][tlx+tmx[i]]==0&&(tlx+tmx[i])>=0&&(tlx+tmx[i])<x&&(tly+tmy[i])>=0&&(tly+tmy[i])<y){
					v.tx=tlx+tmx[i];
					v.ty=tly+tmy[i];
				}
				else{
					v.tx=tlx;
					v.ty=tly;
				}
				if(d[kly+kmy[i]][klx+kmx[i]]==0&&(klx+kmx[i])>=0&&(klx+kmx[i])<x&&(kly+kmy[i])>=0&&(kly+kmy[i])<y){
					v.kx=klx+kmx[i];
					v.ky=kly+kmy[i];
				}
				else{
					v.kx=klx;
					v.ky=kly;
				}
				v.cnt=cl+1;
				p.push(v);
			}
			
		}
		if(tlx==klx&&tly==kly&&cl!=0){
			cout<<cl<<endl;
		}
		else{
			cout<<"NA"<<endl;
		}
	}
????????????return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:1: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      | ^
a.cc:86:2: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |  ^
a.cc:86:3: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |   ^
a.cc:86:4: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |    ^
a.cc:86:5: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |     ^
a.cc:86:6: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |      ^
a.cc:86:7: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |       ^
a.cc:86:8: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |        ^
a.cc:86:9: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |         ^
a.cc:86:10: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |          ^
a.cc:86:11: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |           ^
a.cc:86:12: error: expected primary-expression before '?' token
   86 | ????????????return 0;
      |            ^
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
a.cc:86:13: error: expected ':' before 'return'
   86 | ????????????return 0;
      |             ^~~~~~
      |             :
a.cc:86:13: error: expected primary-expression before 'return'
   86 | ????????????return 0;
      |             ^~~~~~