#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
#define st first
#define nd second
typedef pair<int,int> pun;
typedef long long ll;
int SIZE = 100;
vector<string> v;
void fill(int x, bool where) {
if (where) {
for (int i = 0; i < SIZE; i ++) {
v[i][x] = '1';
}
}
else for (int i = 0; i < SIZE; i ++) {
v[i][x] = '0';
}
if (where) v[0][x] = '0';
else v[99][x] = '1';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
v = vector<string> (SIZE, string(SIZE, '1'));
v[0][1] = '0';
v[1][0] = '0';
for (int i = 2; i < SIZE; i ++) {
v[i][0] = '0';
}
for (int i = 2; i < SIZE; i++) {
fill(i, i % 2);
}
for (int i = 0; i < SIZE; i ++) {
cout << v[i] << "\n";
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; #define st first #define nd second typedef pair<int,int> pun; typedef long long ll; int SIZE = 100; vector<string> v; void fill(int x, bool where) { if (where) { for (int i = 0; i < SIZE; i ++) { v[i][x] = '1'; } } else for (int i = 0; i < SIZE; i ++) { v[i][x] = '0'; } if (where) v[0][x] = '0'; else v[99][x] = '1'; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); v = vector<string> (SIZE, string(SIZE, '1')); v[0][1] = '0'; v[1][0] = '0'; for (int i = 2; i < SIZE; i ++) { v[i][0] = '0'; } for (int i = 2; i < SIZE; i++) { fill(i, i % 2); } for (int i = 0; i < SIZE; i ++) { cout << v[i] << "\n"; } } |
English