#include <bits/stdc++.h> using namespace std; bool tab[100][100]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); tab[0][0] = true; for(int i = 1; i<100; i++){ tab[i][1] = true; } tab[99][2] = true; for(int i = 3; i<100; i++){ if(i % 2 == 1){ tab[0][i] = true; }else{ tab[99][i] = true; } } for(int i = 0; i<100; i++){ for(int j = 0; j<100; j++){ cout << tab[i][j]; } cout << "\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 | #include <bits/stdc++.h> using namespace std; bool tab[100][100]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); tab[0][0] = true; for(int i = 1; i<100; i++){ tab[i][1] = true; } tab[99][2] = true; for(int i = 3; i<100; i++){ if(i % 2 == 1){ tab[0][i] = true; }else{ tab[99][i] = true; } } for(int i = 0; i<100; i++){ for(int j = 0; j<100; j++){ cout << tab[i][j]; } cout << "\n"; } } |