#include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define BOOST ios_base::sync_with_stdio(0), cin.tie(0)
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
const int N = 105;
int t[N][N];
int main(){
BOOST;
for(int i=0; i<100; i+=2){
t[i][99] = 1;
for(int j=1; j<100; j++){
t[i+1][j] = 1;
}
}
t[0][99] = 0;
t[0][0] = 1;
// t[0][0] = 1;
// for(int i=1; i<100; i+=2){
// for(int j=1; j<99; j++){
// t[i][j] = 1;
// }
// if((i/2)&1){
// t[i+1][1] = 1;
// t[i+2][1] = 1;
// }
// else{
// t[i+1][98] = 1;
// t[i+2][98] = 1;
// }
// }
for(int i=0; i<100; i++){
for(int j=0; j<100; j++){
cout << t[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 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; #define st first #define nd second #define pb push_back #define all(x) (x).begin(), (x).end() #define BOOST ios_base::sync_with_stdio(0), cin.tie(0) typedef long long ll; typedef long double ld; typedef pair<int, int> ii; const int N = 105; int t[N][N]; int main(){ BOOST; for(int i=0; i<100; i+=2){ t[i][99] = 1; for(int j=1; j<100; j++){ t[i+1][j] = 1; } } t[0][99] = 0; t[0][0] = 1; // t[0][0] = 1; // for(int i=1; i<100; i+=2){ // for(int j=1; j<99; j++){ // t[i][j] = 1; // } // if((i/2)&1){ // t[i+1][1] = 1; // t[i+2][1] = 1; // } // else{ // t[i+1][98] = 1; // t[i+2][98] = 1; // } // } for(int i=0; i<100; i++){ for(int j=0; j<100; j++){ cout << t[i][j]; } cout << "\n"; } } |
English