10个WA 有大佬帮忙看一眼吗感谢
查看原帖
10个WA 有大佬帮忙看一眼吗感谢
599362
Lichen081103楼主2022/8/31 21:11
#include<bits/stdc++.h>
using namespace std;
int main(){
	int N=0,is=0,count=0;
	cin>>N;
	int i=0;
	while(is<N*N){
		i++;
		int temp;
		cin>>temp;
		if(i%2==1){
			for(int j=1;j<=temp;j++){
				if(count%7==0 && count!=0){
					cout<<endl<<0;
					count++;
				}else{
					cout<<0;
					count++;
				}
			}
		}else if(i%2==0){
			for(int j=1;j<=temp;j++){
				if(count%7==0 && count!=0){
					cout<<endl<<1;
					count++;
				}else{
					cout<<1;
					count++; 
				}
			}
		}
		is+=temp;
	}
	
2022/8/31 21:11
加载中...