为什么测试点没问题,提交却全WA
查看原帖
为什么测试点没问题,提交却全WA
754815
guogy2010楼主2022/9/7 21:09
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,s,t,f=0;
	cin>>n;
	for(s=0;s<=n*n;  ) 
	{
		cin>>t;
		for(int i=1;i<=t;i++)
		{
			if(f==0) cout<<'0';
			else
				cout<<'1'; 
			if((s+i)%n==0&&s+i!=n*n) cout<<endl;

		}
		if(f==1) f=0;
		else
			f=1;
		s+=t;
	}
	
 	return 0;
}
2022/9/7 21:09
加载中...