为啥是WA啊,我真的不李姐~
  • 板块P1319 压缩技术
  • 楼主zsy_NKU
  • 当前回复1
  • 已保存回复1
  • 发布时间2022/11/10 19:16
  • 上次更新2023/10/27 03:30:12
查看原帖
为啥是WA啊,我真的不李姐~
823309
zsy_NKU楼主2022/11/10 19:16
#include<iostream>
#include<cmath>
#include <iomanip>
using namespace std;
int main()
{
	int n,h=0,b=1;
	cin >> n;
	while(h<n*n)
	{
		int k;
		b = 0-b;
		cin >> k;
		if (b == -1) {
			for (int j = 1; j <= k; j++) {
				cout << 0;
				h++;
				if (h % 7 == 0)
					cout << endl;
			}
		}
		if (b == 1) {
			for (int j = 1; j <= k; j++) {
				cout << 1;
				h++;
				if (h % 7 == 0)
					cout << endl;
			}
		}
		

	}


}
2022/11/10 19:16
加载中...