样例过了,但是十分。。。
查看原帖
样例过了,但是十分。。。
934390
__HappY__楼主2023/8/10 21:58
#include<bits/stdc++.h>

using namespace std;

int main() {
	int n;
	cin>>n;
	int l,y;
	int gs=0;
	for(int i=1; i<=n; i++) {
		cin>>l>>y;
		for(int j=1; j<=l; j++) {
			cout<<0;
			gs++;
			if(gs==n) {
				cout<<endl;
				gs=0;
			}
		}
		for(int j=1; j<=y; j++) {
			cout<<1;
			gs++;
			if(gs==n) {
				cout<<endl;
				gs=0;
			}
		}
	}
	return 0;
}
2023/8/10 21:58
加载中...