帮我看看错哪里了,测试点全re
查看原帖
帮我看看错哪里了,测试点全re
1449156
legos楼主2024/10/25 00:31
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	int n,m,h=1,k;
	struct map
	{
		int x,y;
		bool b=1; 
	} a[1005];
	cin>>m>>n>>a[0].x>>a[0].y;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
		{
			cin>>a[h].x>>a[h].y;
			if(a[h].x==0&&a[h].y==0)
			{
				a[h].b=0;
				k=h;
			}
			h++;
		}
    for(int i=0;i<k;i++)
	{
		cout<<a[i].x<<" "<<a[i].y<<endl;
	}
}
2024/10/25 00:31
加载中...