本地能过数据。提交全WA了,大佬帮看下吧
  • 板块P1319 压缩技术
  • 楼主preMd
  • 当前回复2
  • 已保存回复2
  • 发布时间2022/5/16 13:22
  • 上次更新2023/10/28 01:18:59
查看原帖
本地能过数据。提交全WA了,大佬帮看下吧
708884
preMd楼主2022/5/16 13:22
#include <iostream>
#include <cstdio>
using namespace std;
int main () {
	int n , sum = 0 , flag = 0 , num , en;
	cin >> n;

	for ( ; sum < n * n ; ){
		cin >> num;
		flag ++;
		for (int i = 0; i < num ; i ++){
			if (en % n == 0 && en != 0) {
				cout << endl;
				en = 0;
			}
			if (flag % 2 != 0) cout << 0;
			else cout << 1;
			en ++;
			sum ++;
		}
	}
	return 0;
}
2022/5/16 13:22
加载中...