//#pragma GCC optimize ("O2") //#pragma GCC target ("avx2") #include //#include //using namespace atcoder; using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) #define rep1(i, n) for(int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define pb push_back #define mp make_pair #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define Would #define you #define please int main() { cin.tie(0); ios::sync_with_stdio(false); int W, H, X; cin >> W >> H >> X; int h = 0, w = 0; if (H == 1) h = 1; if (H == 3) h = 1; if ((H + 1) % 3 == 0) h = 2; if (W == 1) w = 1; if (W == 3) w = 1; if ((W + 1) % 3 == 0) w = 2; int wh = h * w * 9; if (X > wh) { co(-1); return 0; } if (H == 1) { if (W == 1) co(X); else if (W == 3) cout << 0 << X << 0; else { rep(i, W / 3) cout << X / 2 << (X + 1) / 2 << 0; cout << X / 2 << (X + 1) / 2; } return 0; } if (H == 3) { rep(i, W) cout << 0; cout << endl; if (W == 1) co(X); else if (W == 3) cout << 0 << X << 0; else { rep(i, W / 3) cout << X / 2 << (X + 1) / 2 << 0; cout << X / 2 << (X + 1) / 2; } rep(i, W) cout << 0; cout << endl; return 0; } if (W == 1) { rep(i, H / 3) { co(X / 2); co((X + 1) / 2); co(0); } co(X / 2); co((X + 1) / 2); return 0; } if (W == 3) { rep(i, H / 3) { cout << 0 << X / 2 << 0 << endl; cout << 0 << (X + 1) / 2 << 0 << endl; cout << 0 << 0 << 0 << endl; } cout << 0 << X / 2 << 0 << endl; cout << 0 << (X + 1) / 2 << 0; return 0; } int a = X / 4; int b = (X + 1) / 4; int c = (X + 2) / 4; int d = (X + 3) / 4; rep(i, H / 3) { rep(j, W / 3) { cout << a << b << 0; } cout << a << b << endl; rep(j, W / 3) { cout << c << d << 0; } cout << c << d << endl; rep(j, W) cout << 0; cout << endl; } rep(j, W / 3) { cout << a << b << 0; } cout << a << b << endl; rep(j, W / 3) { cout << c << d << 0; } cout << c << d << endl; Would you please return 0; }