Language: C++

#include<iostream>
#include<cstring>
#include<algorithm> 
#include<string>
#include<string.h>
#include<cstdio>
#include<vector>
#include<queue>
using namespace std;
struct node
{
	int now;
	int step;
	node(int X,int Z)
	{
		now=X;
		step=Z; 
	}
	friend bool operator <(node s1,node s2)
	{
		return s1.step>s2.step;
	}
};
int ans[2005][2005];
vector<node> ve[2005];
int ans2[2005];
void bfs(int n)
{
	priority_queue<node> q;
	for(int i=0;i<ve[n].size();i++)
	{
		q.push(ve[n][i]);
	}
	while(!q.empty())
	{
		node now=q.top();
		q.pop();
		if(ans[n][now.now]!=0)
		{
			continue;
		}
		ans[n][now.now]=now.step;
		for(int i=0;i<ve[now.now].size();i++)
		{
			node temp=now;
			temp.step=now.step+1;
			temp.now=ve[now.now][i].now; 
			q.push(temp);
		}
	}
}
int main()
{
	int n,x,y;
	cin>>n>>x>>y;
	ve[x].push_back(node(y,1));
	ve[y].push_back(node(x,1));
	for(int i=1;i<=n-1;i++)
	{
		ve[i].push_back(node(i+1,1));	
		ve[i+1].push_back(node(i,1));
	} 
	for(int i=1;i<=n-1;i++)
	{	
		bfs(i);
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			if(i==j)
				continue;
			if(ans[i][j]==0&&ans[j][i]!=0)
			{
				ans2[ans[j][i]]++;
//				cout<<i<<" "<<j<<" "<<ans[j][i]<<endl;
			}
			else if(ans[i][j]!=0&&ans[j][i]==0)
			{
				ans2[ans[i][j]]++;
//				cout<<i<<" "<<j<<" "<<ans[i][j]<<endl;
			}
			else
			{
				ans2[min(ans[i][j],ans[j][i])]++;
//				cout<<i<<" "<<j<<" "<<min(ans[i][j],ans[j][i])<<endl;
			}
		}
	}
	for(int i=1;i<n;i++)
	{#include<iostream>
#include<cstring>
#include<algorithm> 
#include<string>
#include<string.h>
#include<cstdio>
#include<vector>
#include<queue>
using namespace std;
struct node
{
	int now;
	int step;
	node(int X,int Z)
	{
		now=X;
		step=Z; 
	}
	friend bool operator <(node s1,node s2)
	{
		return s1.step>s2.step;
	}
};
int ans[2005][2005];
vector<node> ve[2005];
int ans2[2005];
void bfs(int n)
{
	priority_queue<node> q;
	for(int i=0;i<ve[n].size();i++)
	{
		q.push(ve[n][i]);
	}
	while(!q.empty())
	{
		node now=q.top();
		q.pop();
		if(ans[n][now.now]!=0)
		{
			continue;
		}
		ans[n][now.now]=now.step;
		for(int i=0;i<ve[now.now].size();i++)
		{
			node temp=now;
			temp.step=now.step+1;
			temp.now=ve[now.now][i].now; 
			q.push(temp);
		}
	}
}
int main()
{
	int n,x,y;
	cin>>n>>x>>y;
	ve[x].push_back(node(y,1));
	ve[y].push_back(node(x,1));
	for(int i=1;i<=n-1;i++)
	{
		ve[i].push_back(node(i+1,1));	
		ve[i+1].push_back(node(i,1));
	} 
	for(int i=1;i<=n-1;i++)
	{	
		bfs(i);
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			if(i==j)
				continue;
			if(ans[i][j]==0&&ans[j][i]!=0)
			{
				ans2[ans[j][i]]++;
//				cout<<i<<" "<<j<<" "<<ans[j][i]<<endl;
			}
			else if(ans[i][j]!=0&&ans[j][i]==0)
			{
				ans2[ans[i][j]]++;
//				cout<<i<<" "<<j<<" "<<ans[i][j]<<endl;
			}
			else
			{
				ans2[min(ans[i][j],ans[j][i])]++;
//				cout<<i<<" "<<j<<" "<<min(ans[i][j],ans[j][i])<<endl;
			}
		}
	}
	for(int i=1;i<n;i++)
	{
		cout<<ans2[i]/2<<endl;
	}
	return 0;
} 
		cout<<ans2[i]/2<<endl;
	}
	return 0;
} 

Compiler output:
a.cc:91:10: error: stray '#' in program
   91 |         {#include<iostream>
      |          ^
a.cc: In function 'int main()':
a.cc:91:11: error: 'include' was not declared in this scope
   91 |         {#include<iostream>
      |           ^~~~~~~
a.cc:91:27: error: expected primary-expression before '>' token
   91 |         {#include<iostream>
      |                           ^
a.cc:99:1: error: expected primary-expression before 'using'
   99 | using namespace std;
      | ^~~~~
a.cc:109:21: error: cannot define friend function 'operator<' in a local class definition
  109 |         friend bool operator <(node s1,node s2)
      |                     ^~~~~~~~
a.cc:109:21: error: 'bool main()::node::operator<(main()::node, main()::node)' must have exactly one argument
a.cc:118:1: error: a function-definition is not allowed here before '{' token
  118 | {
      | ^
a.cc:142:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  142 | int main()
      |         ^~
a.cc:142:9: note: remove parentheses to default-initialize a variable
  142 | int main()
      |         ^~
      |         --
a.cc:142:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:143:1: error: a function-definition is not allowed here before '{' token
  143 | {
      | ^