You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
548 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int N = 0;
cin >> N;
int a;
int count = 0;
int cishu = 0;
while (1) {
cin >> a;
cishu++;
for (int i = 0; i < a; i++) {
if (cishu % 2 == 0) {
cout << "1";
} else {
cout << "0";
}
count++;
if (count % N == 0) {
cout << endl;
}
}
if (count == N * N) {
break;
}
}
return 0;
}