Language: C++

#include <iostream>#include <map>#include <vector>#include <cstring>#include <utility>#include <algorithm>#include <cstdio>#include <queue>#include <string>#include <stack>#include <set>#include <deque>#define mp make_pairtypedef long long ll;using namespace std;int a,b,c,u[105][105];queue <pair<int,int> > que;pair <int,int> xx,f;int main(){	cin>>a>>b>>c;	f.first=b-a+51;	f.second=c-b+51;	que.push(f);	u[f.first][f.second]=1;	while (!que.empty()){		xx=que.front();		if (xx.first==51 && xx.second==51){			cout<<u[xx.first][xx.second]-1<<endl;			return 0;		} 		que.pop();		if (!u[xx.first+1][xx.second]){			u[xx.first+1][xx.second]=u[xx.first][xx.second]+1;			que.push(mp(xx.first+1,xx.second)); 		}		if (!u[xx.first-1][xx.second+1]){			u[xx.first-1][xx.second+1]=u[xx.first][xx.second]+1;			que.push(mp(xx.first-1,xx.second+1)); 		}		if (!u[xx.first][xx.second-1]){			u[xx.first][xx.second-1]=u[xx.first][xx.second]+1;			que.push(mp(xx.first,xx.second-1));		}		if (!u[xx.first-2][xx.second]){			u[xx.first-2][xx.second]=u[xx.first][xx.second]+1;			que.push(mp(xx.first-2,xx.second)); 		}		if (!u[xx.first+2][xx.second-2]){			u[xx.first+2][xx.second-2]=u[xx.first][xx.second]+1;			que.push(mp(xx.first+2,xx.second-2)); 		}		if (!u[xx.first][xx.second+2]){			u[xx.first][xx.second+2]=u[xx.first][xx.second]+1;			que.push(mp(xx.first,xx.second+2)); 		}	}} 

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>#include <map>#include <vector>#include <cstring>#include <utility>#include <algorithm>#include <cstdio>#include <queue>#include <string>#include <stack>#include <set>#include <deque>#define mp make_pairtypedef long long ll;using namespace std;int a,b,c,u[105][105];queue <pair<int,int> > que;pair <int,int> xx,f;int main(){ cin>>a>>b>>c;   f.first=b-a+51; f.second=c-b+51;        que.push(f);    u[f.first][f.second]=1; while (!que.empty()){           xx=que.front();         if (xx.first==51 && xx.second==51){                     cout<<u[xx.first][xx.second]-1<<endl;                   return 0;               }               que.pop();              if (!u[xx.first+1][xx.second]){                 u[xx.first+1][xx.second]=u[xx.first][xx.second]+1;                      que.push(mp(xx.first+1,xx.second));             }               if (!u[xx.first-1][xx.second+1]){                       u[xx.first-1][xx.second+1]=u[xx.first][xx.second]+1;                    que.push(mp(xx.first-1,xx.second+1));           }               if (!u[xx.first][xx.second-1]){                 u[xx.first][xx.second-1]=u[xx.first][xx.second]+1;                      que.push(mp(xx.first,xx.second-1));             }               if (!u[xx.first-2][xx.second]){                 u[xx.first-2][xx.second]=u[xx.first][xx.second]+1;                      que.push(mp(xx.first-2,xx.second));             }               if (!u[xx.first+2][xx.second-2]){                       u[xx.first+2][xx.second-2]=u[xx.first][xx.second]+1;                    que.push(mp(xx.first+2,xx.second-2));           }               if (!u[xx.first][xx.second+2]){                 u[xx.first][xx.second+2]=u[xx.first][xx.second]+1;                      que.push(mp(xx.first,xx.second+2));             }       }}
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status