请求添加数据
查看原帖
请求添加数据
959582
dongrunxuan楼主2023/11/4 19:06

直接输出曼哈顿距离80pts 这数据也太水了……

#include<bits/stdc++.h>
using namespace std;
const int maxn=1e3+10;
string a[maxn];
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	int xx,yx,xy,yy;
	cin>>xx>>yx>>xy>>yy;
	cout<<abs(yx-yy)+abs(xx-xy);	    
	return 0;
}

[提交记录]https://www.luogu.com.cn/record/133348899

2023/11/4 19:06
加载中...