#include <bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); constexpr int N = 100; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { int a; if (i == 0 || i % 2 == 1) { a = j == 0 || j % 2 == 1; } else { a = j != N - 1 && j % 2 == 1; } a ^= (i + j) % 2; std::cout << "01"[a]; } std::cout << "\n"; } 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 28 | #include <bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); constexpr int N = 100; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { int a; if (i == 0 || i % 2 == 1) { a = j == 0 || j % 2 == 1; } else { a = j != N - 1 && j % 2 == 1; } a ^= (i + j) % 2; std::cout << "01"[a]; } std::cout << "\n"; } return 0; } |