#include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s1 = "0" + string(99, '1');
string s2 = string(99, '0') + "1";
string s3 = "1" + string(99, '0');
cout << s3 << endl;
for (int i = 0; i < 99; i++) {
if(i % 2 == 0) {
cout << s1 << endl;
} else {
cout << s2 << endl;
}
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <bits/stdc++.h> using namespace std; #define st first #define nd second int main() { ios::sync_with_stdio(0); cin.tie(0); string s1 = "0" + string(99, '1'); string s2 = string(99, '0') + "1"; string s3 = "1" + string(99, '0'); cout << s3 << endl; for (int i = 0; i < 99; i++) { if(i % 2 == 0) { cout << s1 << endl; } else { cout << s2 << endl; } } } |
English