#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
const int n = 100;
FOR(i, 0, n)
{
FOR(j, 0, n)
{
cout << ((i == 0 && j > 0) || (i % 2 == 0 && j == n - 1) || (i % 2 == 1 && j == 0));
}
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 29 30 31 32 33 34 | #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--) #define SZ(a) int(a.size()) #define ALL(a) a.begin(), a.end() #define PB push_back #define MP make_pair #define F first #define S second typedef long long LL; typedef vector<int> VI; typedef vector<LL> VL; typedef pair<int, int> PII; typedef pair<LL, LL> PLL; typedef double db; int main() { ios::sync_with_stdio(0); cin.tie(0); const int n = 100; FOR(i, 0, n) { FOR(j, 0, n) { cout << ((i == 0 && j > 0) || (i % 2 == 0 && j == n - 1) || (i % 2 == 1 && j == 0)); } cout << "\n"; } return 0; } |
English