#include <stdio.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>
using namespace std;
int n = 100;
void wyp(int a, int b, int c) {
char s[113];
s[0] = '0' + a;
s[n-1] = '0' + c;
s[n] = 0;
for (int i = 1; i < n-1; i++) s[i] = '0' + b;
puts(s);
}
int main() {
wyp(1, 0, 0);
for(int i = 1; i < n-1; i += 2) {
wyp(0, 1, 1);
wyp(0, 0, 1);
}
wyp(0, 1, 1);
return 0;
}
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 | #include <stdio.h> #include <vector> #include <algorithm> #include <utility> #include <map> using namespace std; int n = 100; void wyp(int a, int b, int c) { char s[113]; s[0] = '0' + a; s[n-1] = '0' + c; s[n] = 0; for (int i = 1; i < n-1; i++) s[i] = '0' + b; puts(s); } int main() { wyp(1, 0, 0); for(int i = 1; i < n-1; i += 2) { wyp(0, 1, 1); wyp(0, 0, 1); } wyp(0, 1, 1); return 0; } |
English