#include<bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v=(i) #define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i) #define VI vector<int> #define PII pair<int,int> #define st first #define nd second #define mp make_pair #define pb push_back #define lint long long int #define debug(x) {cerr <<#x <<" = " <<x <<endl; } #define debug2(x,y) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y <<endl; } #define debug3(x,y,z) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y << ", " << #z << " = " << z <<endl; } #define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<endl; }} #define debugt(t,n) {{cerr <<#t <<" = "; FOR(it,0,(n)) cerr <<t[it] <<", "; cerr <<endl; }} #define make( x) int (x); scanf("%d",&(x)); #define make2( x, y) int (x), (y); scanf("%d%d",&(x),&(y)); #define make3(x, y, z) int (x), (y), (z); scanf("%d%d%d",&(x),&(y),&(z)); #define make4(x, y, z, t) int (x), (y), (z), (t); scanf("%d%d%d%d",&(x),&(y),&(z),&(t)); #define IOS ios_base::sync_with_stdio(0) #define HEAP priority_queue #define read( x) scanf("%d",&(x)); #define read2( x, y) scanf("%d%d",&(x),&(y)); #define read3(x, y, z) scanf("%d%d%d",&(x),&(y),&(z)); #define read4(x, y, z, t) scanf("%d%d%d%d",&(x),&(y),&(z),&(t)); using namespace std; vector<string> s = { "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000011111111110000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000001111111111111100000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000111110000011111110000000000000000000000000000000000000000000", "0000000000000000000000000000000000000001111000000000011111100000000000000000000000000000000000000000", "0000000000000000000000000000000000000011100000000000001111110000000000000000000000000000000000000000", "0000000000000000000000000000000000000111000000000000000011111000000000000000000000000000000000000000", "0000000000000000000000000000000000000110000000000000000001111100000000000000000000000000000000000000", "0000000000000000000000000000000000001100000000000000000001111101110000000000000000000000000000000000", "0000000000000000000000000000000000011000000000000000000011111111111111100000000000000000000000000000", "0000000000000000000000000000001111111111111000000000011111111111111111111100000000000000000000000000", "0000000000000000000000000001111110110000011111100011111111111111111111111110000000000000000000000000", "0000000000000000000000000111100000100000000000111111111111111111100001111111000000000000000000000000", "0000000000000000000000011110000001100000000000111111111100000111100000001111100000000000000000000000", "0000000000000000000000111100000001000000000011111111111000000111110000000011110000000000000000000000", "0000000000000000000001111000000001000000001111111110001110000011110000000001110000000000000000000000", "0000000000000000000001110000000011000000011111111000000011100011111000000000111000000000000000000000", "0000000000000000000011100000000010000001111111100000000000111001111000000000011000000000000000000000", "0000000000000000000011100000000010000011111110111111111000001101111000000000011100000000000000000000", "0000000000000000000111100000000110000111111111111111111111000111111100000000001100000000000000000000", "0000000000000000000111000000000100011111111111101100011111100001111100000000001100000000000000000000", "0000000000000000000111000000000100111111111110011111000001111000111100000000001100000000000000000000", "0000000000000000000111000000000101111111111101111111000000111100011110000000001100000000000000000000", "0000000000000000000111000000001111111101111001111111000000011110011110000000001100000000000000000000", "0000000000000000000111000000001111111011110001110011100000001110011111000000001100000000000000000000", "0000000000000000000111000000001111110011100001111111110110000111011111100000001100000000000000000000", "0000000000000000000111100000011111100111000001111111111110000111111110110000001100000000000000000000", "0000000000000000000111100000011111000111000001111111111111100111101111011000001000000000000000000000", "0000000000000000000111100000111110000110000111111111110111100111101111001000001000000000000000000000", "0000000000000000000011110001111100000110000111111111110011000111101111001100011000000000000000000000", "0000000000000000000011110011111000000110001111111111111111101111101111000110010000000000000000000000", "0000000000000000000011111011111000000110011110000111111111101111101111000011010000000000000000000000", "0000000000000000000001111111111000000110001110001111001101011111101111000001110000000000000000000000", "0000000000000000000001111111101000000111001111111111000111111111001111000001100000000000000000000000", "0000000000000000000000111111001000000111101111111111001111111111001111000001110000000000000000000000", "0000000000000000000000111111001000000011110111111111111111111111101111000001010000000000000000000000", "0000000000000000000000011111001000000011110011111011111111111111101111000011011000000000000000000000", "0000000000000000000000111111101000000001111000010111111111111111111111000110001000000000000000000000", "0000000000000000000000111111101000000001111111110111111111111111111111000100001100000000000000000000", "0000000000000000000000111111111000000001111111111111111111111111111111001100001100000000000000000000", "0000000000000000000001111011111000000001111111111111111111111111111111011000000100000000000000000000", "0000000000000000000001111001111100000001111111111111111111111111001111110000000110000000000000000000", "0000000000000000000001110001111110000011111111111111111111111111001111100000000110000000000000000000", "0000000000000000000011110000111111000011111111111111111111111111001111100000000110000000000000000000", "0000000000000000000011110000011111100011111111111111111111111111001111000000000110000000000000000000", "0000000000000000000011110000001111111001111111111111111111111100001111000000000110000000000000000000", "0000000000000000000011100000000111111100011111111111111111111100001111000000000110000000000000000000", "0000000000000000000011100000000111111110001111111111111111110000011110000000000110000000000000000000", "0000000000000000000011100000000010111111100111111111111111110000111110000000000110000000000000000000", "0000000000000000000011100000000010011111111011111111111111110011111110000000001110000000000000000000", "0000000000000000000011100000000011001111111100111111111111100110011110000000001110000000000000000000", "0000000000000000000011110000000001000011111111011110000000001100111100000000011100000000000000000000", "0000000000000000000001110000000001000000111111111100000000111000111100000000111100000000000000000000", "0000000000000000000001110000000001100000011111111100000001100000111100000001111000000000000000000000", "0000000000000000000000111000000000100000000111111111100111000001111000000011111000000000000000000000", "0000000000000000000000111000000000110000000001111111111110000001111000001111110000000000000000000000", "0000000000000000000000011100000000010000000000011111111111111111111111111111100000000000000000000000", "0000000000000000000000001111000000011000000000000111111111111111111111111110000000000000000000000000", "0000000000000000000000000111100000001100000000111100011111111111111111111000000000000000000000000000", "0000000000000000000000000011111100001100000111100000000001111111111111000000000000000000000000000000", "0000000000000000000000000000011111111111111100000000000000001111100000000000000000000000000000000000", "0000000000000000000000000000000000000011000000000000000000011111000000000000000000000000000000000000", "0000000000000000000000000000000000000011100000000000000000111110000000000000000000000000000000000000", "0000000000000000000000000000000000000001110000000000000001111110000000000000000000000000000000000000", "0000000000000000000000000000000000000000111000000000000011111100000000000000000000000000000000000000", "0000000000000000000000000000000000000000011110000000000111111000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000111100000111111110000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000011111111111111000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", }; bool isprime(int x) { for (int i = 2; i * i <= x; i++) { if (x % i == 0) return false; } return true; } int thm(int x) { if (x == 0) return 0; if (x %2 == 0) return thm(x/2); return 1 - thm(x/2); } int f(int x, int y) { if (x == 0 && y == 0) return 0; if (x == 0) return 1; if (x % 2 == 1) { if (y == 0) return 1; return 0; } if (y == 99) return 0; return 1; } int main() { srand(time(NULL)); FOR(i,0,100) FOR(j,0,100) { s[i][j] = '0' + f(i,j); } for (int i = 0; i < 100; i++) { cout << s[i] << endl; } }
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | #include<bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v=(i) #define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i) #define VI vector<int> #define PII pair<int,int> #define st first #define nd second #define mp make_pair #define pb push_back #define lint long long int #define debug(x) {cerr <<#x <<" = " <<x <<endl; } #define debug2(x,y) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y <<endl; } #define debug3(x,y,z) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y << ", " << #z << " = " << z <<endl; } #define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<endl; }} #define debugt(t,n) {{cerr <<#t <<" = "; FOR(it,0,(n)) cerr <<t[it] <<", "; cerr <<endl; }} #define make( x) int (x); scanf("%d",&(x)); #define make2( x, y) int (x), (y); scanf("%d%d",&(x),&(y)); #define make3(x, y, z) int (x), (y), (z); scanf("%d%d%d",&(x),&(y),&(z)); #define make4(x, y, z, t) int (x), (y), (z), (t); scanf("%d%d%d%d",&(x),&(y),&(z),&(t)); #define IOS ios_base::sync_with_stdio(0) #define HEAP priority_queue #define read( x) scanf("%d",&(x)); #define read2( x, y) scanf("%d%d",&(x),&(y)); #define read3(x, y, z) scanf("%d%d%d",&(x),&(y),&(z)); #define read4(x, y, z, t) scanf("%d%d%d%d",&(x),&(y),&(z),&(t)); using namespace std; vector<string> s = { "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000011111111110000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000001111111111111100000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000111110000011111110000000000000000000000000000000000000000000", "0000000000000000000000000000000000000001111000000000011111100000000000000000000000000000000000000000", "0000000000000000000000000000000000000011100000000000001111110000000000000000000000000000000000000000", "0000000000000000000000000000000000000111000000000000000011111000000000000000000000000000000000000000", "0000000000000000000000000000000000000110000000000000000001111100000000000000000000000000000000000000", "0000000000000000000000000000000000001100000000000000000001111101110000000000000000000000000000000000", "0000000000000000000000000000000000011000000000000000000011111111111111100000000000000000000000000000", "0000000000000000000000000000001111111111111000000000011111111111111111111100000000000000000000000000", "0000000000000000000000000001111110110000011111100011111111111111111111111110000000000000000000000000", "0000000000000000000000000111100000100000000000111111111111111111100001111111000000000000000000000000", "0000000000000000000000011110000001100000000000111111111100000111100000001111100000000000000000000000", "0000000000000000000000111100000001000000000011111111111000000111110000000011110000000000000000000000", "0000000000000000000001111000000001000000001111111110001110000011110000000001110000000000000000000000", "0000000000000000000001110000000011000000011111111000000011100011111000000000111000000000000000000000", "0000000000000000000011100000000010000001111111100000000000111001111000000000011000000000000000000000", "0000000000000000000011100000000010000011111110111111111000001101111000000000011100000000000000000000", "0000000000000000000111100000000110000111111111111111111111000111111100000000001100000000000000000000", "0000000000000000000111000000000100011111111111101100011111100001111100000000001100000000000000000000", "0000000000000000000111000000000100111111111110011111000001111000111100000000001100000000000000000000", "0000000000000000000111000000000101111111111101111111000000111100011110000000001100000000000000000000", "0000000000000000000111000000001111111101111001111111000000011110011110000000001100000000000000000000", "0000000000000000000111000000001111111011110001110011100000001110011111000000001100000000000000000000", "0000000000000000000111000000001111110011100001111111110110000111011111100000001100000000000000000000", "0000000000000000000111100000011111100111000001111111111110000111111110110000001100000000000000000000", "0000000000000000000111100000011111000111000001111111111111100111101111011000001000000000000000000000", "0000000000000000000111100000111110000110000111111111110111100111101111001000001000000000000000000000", "0000000000000000000011110001111100000110000111111111110011000111101111001100011000000000000000000000", "0000000000000000000011110011111000000110001111111111111111101111101111000110010000000000000000000000", "0000000000000000000011111011111000000110011110000111111111101111101111000011010000000000000000000000", "0000000000000000000001111111111000000110001110001111001101011111101111000001110000000000000000000000", "0000000000000000000001111111101000000111001111111111000111111111001111000001100000000000000000000000", "0000000000000000000000111111001000000111101111111111001111111111001111000001110000000000000000000000", "0000000000000000000000111111001000000011110111111111111111111111101111000001010000000000000000000000", "0000000000000000000000011111001000000011110011111011111111111111101111000011011000000000000000000000", "0000000000000000000000111111101000000001111000010111111111111111111111000110001000000000000000000000", "0000000000000000000000111111101000000001111111110111111111111111111111000100001100000000000000000000", "0000000000000000000000111111111000000001111111111111111111111111111111001100001100000000000000000000", "0000000000000000000001111011111000000001111111111111111111111111111111011000000100000000000000000000", "0000000000000000000001111001111100000001111111111111111111111111001111110000000110000000000000000000", "0000000000000000000001110001111110000011111111111111111111111111001111100000000110000000000000000000", "0000000000000000000011110000111111000011111111111111111111111111001111100000000110000000000000000000", "0000000000000000000011110000011111100011111111111111111111111111001111000000000110000000000000000000", "0000000000000000000011110000001111111001111111111111111111111100001111000000000110000000000000000000", "0000000000000000000011100000000111111100011111111111111111111100001111000000000110000000000000000000", "0000000000000000000011100000000111111110001111111111111111110000011110000000000110000000000000000000", "0000000000000000000011100000000010111111100111111111111111110000111110000000000110000000000000000000", "0000000000000000000011100000000010011111111011111111111111110011111110000000001110000000000000000000", "0000000000000000000011100000000011001111111100111111111111100110011110000000001110000000000000000000", "0000000000000000000011110000000001000011111111011110000000001100111100000000011100000000000000000000", "0000000000000000000001110000000001000000111111111100000000111000111100000000111100000000000000000000", "0000000000000000000001110000000001100000011111111100000001100000111100000001111000000000000000000000", "0000000000000000000000111000000000100000000111111111100111000001111000000011111000000000000000000000", "0000000000000000000000111000000000110000000001111111111110000001111000001111110000000000000000000000", "0000000000000000000000011100000000010000000000011111111111111111111111111111100000000000000000000000", "0000000000000000000000001111000000011000000000000111111111111111111111111110000000000000000000000000", "0000000000000000000000000111100000001100000000111100011111111111111111111000000000000000000000000000", "0000000000000000000000000011111100001100000111100000000001111111111111000000000000000000000000000000", "0000000000000000000000000000011111111111111100000000000000001111100000000000000000000000000000000000", "0000000000000000000000000000000000000011000000000000000000011111000000000000000000000000000000000000", "0000000000000000000000000000000000000011100000000000000000111110000000000000000000000000000000000000", "0000000000000000000000000000000000000001110000000000000001111110000000000000000000000000000000000000", "0000000000000000000000000000000000000000111000000000000011111100000000000000000000000000000000000000", "0000000000000000000000000000000000000000011110000000000111111000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000111100000111111110000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000011111111111111000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", }; bool isprime(int x) { for (int i = 2; i * i <= x; i++) { if (x % i == 0) return false; } return true; } int thm(int x) { if (x == 0) return 0; if (x %2 == 0) return thm(x/2); return 1 - thm(x/2); } int f(int x, int y) { if (x == 0 && y == 0) return 0; if (x == 0) return 1; if (x % 2 == 1) { if (y == 0) return 1; return 0; } if (y == 99) return 0; return 1; } int main() { srand(time(NULL)); FOR(i,0,100) FOR(j,0,100) { s[i][j] = '0' + f(i,j); } for (int i = 0; i < 100; i++) { cout << s[i] << endl; } } |