Language: C++

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;

template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;

template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
template<typename T>
bool isin(T y, T x, T h, T w) { return (0 <= y && 0 <= x && y < h && x < w); }
template<typename T>
bool isin1(T y, T x, T h, T w) { return (0 < y && 0 < x && y <= h && x <= w); }

template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
	os << v[0];
	for (int i = 1; i < v.size(); i++) os << " " << v[i];
	return (os);
}

template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
	for (auto &u : v) is >> u; return (is);
}

template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
	return (is >> p.first >> p.second);
}

void store(vvint &d, int y, int x, int wide) {
	for (int j = x; j < x+wide; j++) d[y][j] = 1;
}

void Main() {
	int H, W, A, B; cin >> H >> W >> A >> B;
	
	vvint ans(H, vint(W));
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cout << ((i < B) ^ (j < A));
		}
		cout << el;
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout << fixed << setprecision(20);
	Main();
	return (0);
}
bash-4.3(leaves):~/Work/cpr/Virtual/20200319
515:{tinumu}$ cat c.cpp 
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;

template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;

template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
template<typename T>
bool isin(T y, T x, T h, T w) { return (0 <= y && 0 <= x && y < h && x < w); }
template<typename T>
bool isin1(T y, T x, T h, T w) { return (0 < y && 0 < x && y <= h && x <= w); }

template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
	os << v[0];
	for (int i = 1; i < v.size(); i++) os << " " << v[i];
	return (os);
}

template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
	for (auto &u : v) is >> u; return (is);
}

template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
	return (is >> p.first >> p.second);
}

void Main() {
	int H, W, A, B; cin >> H >> W >> A >> B;
	
	vvint ans(H, vint(W));
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cout << ((i < B) ^ (j < A));
		}
		cout << el;
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout << fixed << setprecision(20);
	Main();
	return (0);
}


Compiler output:
a.cc:80:1: error: 'bash' does not name a type
   80 | bash-4.3(leaves):~/Work/cpr/Virtual/20200319
      | ^~~~
a.cc:81:13: error: '$' does not name a type
   81 | 515:{tinumu}$ cat c.cpp
      |             ^
a.cc:103:15: error: redefinition of 'constexpr const int INF'
  103 | constexpr int INF = (1 << 30) - 1;
      |               ^~~
a.cc:22:15: note: 'constexpr const int INF' previously defined here
   22 | constexpr int INF = (1 << 30) - 1;
      |               ^~~
a.cc:104:14: error: redefinition of 'constexpr const ll LLINF'
  104 | constexpr ll LLINF = 1LL << 60;
      |              ^~~~~
a.cc:23:14: note: 'constexpr const ll LLINF' previously defined here
   23 | constexpr ll LLINF = 1LL << 60;
      |              ^~~~~
a.cc:105:15: error: redefinition of 'constexpr const int dy []'
  105 | constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
      |               ^~
a.cc:24:15: note: 'constexpr const int dy [8]' previously defined here
   24 | constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
      |               ^~
a.cc:106:15: error: redefinition of 'constexpr const int dx []'
  106 | constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
      |               ^~
a.cc:25:15: note: 'constexpr const int dx [8]' previously defined here
   25 | constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
      |               ^~
a.cc:107:16: error: redefinition of 'constexpr const char el'
  107 | constexpr char el = '\n';
      |                ^~
a.cc:26:16: note: 'constexpr const char el' previously defined here
   26 | constexpr char el = '\n';
      |                ^~
a.cc:108:15: error: redefinition of 'constexpr const int mod'
  108 | constexpr int mod = 1000000007;
      |               ^~~
a.cc:27:15: note: 'constexpr const int mod' previously defined here
   27 | constexpr int mod = 1000000007;
      |               ^~~
a.cc:110:24: error: redefinition of 'template<class T> T gcd(T, T)'
  110 | template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
      |                        ^~~
a.cc:29:24: note: 'template<class T> T gcd(T, T)' previously declared here
   29 | template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
      |                        ^~~
a.cc:111:24: error: redefinition of 'template<class T> T lcm(T, T)'
  111 | template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
      |                        ^~~
a.cc:30:24: note: 'template<class T> T lcm(T, T)' previously declared here
   30 | template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
      |                        ^~~
a.cc:113:13: error: redefinition of 'template<class T1, class T2> bool chmin(T1&, T2)'
  113 | inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
      |             ^~~~~
a.cc:32:13: note: 'template<class T1, class T2> bool chmin(T1&, T2)' previously declared here
   32 | inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
      |             ^~~~~
a.cc:115:13: error: redefinition of 'template<class T1, class T2> bool chmax(T1&, T2)'
  115 | inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
      |             ^~~~~
a.cc:34:13: note: 'template<class T1, class T2> bool chmax(T1&, T2)' previously declared here
   34 | inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
      |             ^~~~~
a.cc:117:6: error: redefinition of 'template<class T> bool isin(T, T, T, T)'
  117 | bool isin(T y, T x, T h, T w) { return (0 <= y && 0 <= x && y < h && x < w); }
      |      ^~~~
a.cc:36:6: note: 'template<class T> bool isin(T, T, T, T)' previously declared here
   36 | bool isin(T y, T x, T h, T w) { return (0 <= y && 0 <= x && y < h && x < w); }
      |      ^~~~
a.cc:119:6: error: redefinition of 'template<class T> bool isin1(T, T, T, T)'
  119 | bool isin1(T y, T x, T h, T w) { return (0 < y && 0 < x && y <= h && x <= w); }
      |      ^~~~~
a.cc:38:6: note: 'template<class T> bool isin1(T, T, T, T)' previously declared here
   38 | bool isin1(T y, T x, T h, T w) { return (0 < y && 0 < x && y <= h && x <= w); }
      |      ^~~~~
a.cc:122:10: error: redefinition of 'template<class T> std::ostream& operator<<(std::ostream&, std::vector<_Tp>&)'
  122 | ostream& operator <<(ostream &os, vector<T> &v) {
      |          ^~~~~~~~
a.cc:41:10: note: 'template<class T> std::ostream& operator<<(std::ostream&, std::vector<_Tp>&)' previously declared here
   41 | ostream& operator <<(ostream &os, vector<T> &v) {
      |          ^~~~~~~~
a.cc:129:10: error: redefinition of 'template<class T> std::istream& operator>>(std::istream&, std::vector<_Tp>&)'
  129 | istream& operator >>(istream &is, vector<T> &v) {
      |          ^~~~~~~~
a.cc:48:10: note: 'template<class T> std::istream& operator>>(std::istream&, std::vector<_Tp>&)' previously declared here
   48 | istream& operator >>(istream &is, vector<T> &v) {
      |          ^~~~~~~~
a.cc:134:10: error: redefinition of 'template<class T1, class T2> std::istream& operator>>(std::istream&, std::pair<_T1, _T2>&)'
  134 | istream& operator >>(istream &is, pair<T1, T2> &p) {
      |          ^~~~~~~~
a.cc:53:10: note: 'template<class T1, class T2> std::istream& operator>>(std::istream&, std::pair<_T1, _T2>&)' previously declared here
   53 | istream& operator >>(istream &is, pair<T1, T2> &p) {
      |          ^~~~~~~~
a.cc:138:6: error: redefinition of 'void Main()'
  138 | void Main() {
      |      ^~~~
a.cc:61:6: note: 'void Main()' previously defined here
   61 | void Main() {
      |      ^~~~
a.cc:150:5: error: redefinition of 'int main()'
  150 | int main() {
      |     ^~~~
a.cc:73:5: note: 'int main()' previously defined here
   73 | int main() {
      |     ^~~~