求助!
查看原帖
求助!
821849
TFHS_arsc楼主2024/3/23 19:23

¿

#include<iostream>
using namespace std;
int n;
int a[300];
bool k=0;
int full=0;
int main(){
	
	cin>>n;
	int i=0;
	while(cin>>a[++i]){
		full++;
		for(int j=1;j<=a[i];j++){
			cout<<k;
		}
		k=!k;
		if(full==n){
			full=0;
			cout<<"\n";
		}
	}
	
	return 0;
}
2024/3/23 19:23
加载中...