样例都没问题但全是WA
查看原帖
样例都没问题但全是WA
1598950
Herosaveshimself楼主2025/1/23 18:08
#include<iostream>
using namespace std;
int main()
{
	int n, s = 0, t, l = 1;
	cin >> n;
	while (s <= n * n)
	{
		cin >> t;
		if (l % 2 == 1)
		{
			for (int j = 0; j < t; j++)
			{
				cout << 0;
				s++;
				if (s % n == 0)cout << endl;
			}
		}
		if (l % 2 == 0)
		{
			for (int j = 0; j < t; j++)
			{
				cout << 1;
				s++;
				if (s % n == 0)cout << endl;
			}
		}
		l++;
	}
	return 0;
}
2025/1/23 18:08
加载中...