蒟蒻求助!2,9,10TLE!
查看原帖
蒟蒻求助!2,9,10TLE!
574215
OneLeft楼主2022/1/26 13:34
#include<bits/stdc++.h>
using namespace std;
long long n,x,y,t;
int main()
{
	cin>>n;
	while(t!=n*n)
	{
		cin>>x>>y;
		for(int j=1;j<=x;j++)
		{
			t++;
			cout<<"0";
			if(t%n==0)
				cout<<"\n";
		}
		for(int j=1;j<=y;j++)
		{
			t++;
			cout<<"1";
			if(t%n==0)
				cout<<"\n";
		}
	}
	
	return 0;
}
2022/1/26 13:34
加载中...