Submission #7641474


Source Code Expand

Copy
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define int long long
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e18;

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int h, w, a, b;
    cin >> h >> w >> a >> b;
    vector<vector<int> > c(h, vector<int>(w));
    rep(i, 0, h){
        rep(j, 0, w){
            if(i < b){
                c[i][j] = (j < a);
            }else{
                c[i][j] = !(j < a);
            }
        }
    }
    rep(i, 0, h){
        for(int ii = 0; ii < c[i].size(); ii++){
            cout << c[i][ii];
        }
        cout << endl;
    }
}

Submission Info

Submission Time
Task A - 01 Matrix
User treeone
Language C++14 (GCC 5.4.1)
Score 300
Code Size 707 Byte
Status AC
Exec Time 45 ms
Memory 9088 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 14
Set Name Test Cases
Sample sample-01.txt, sample-02.txt
All 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, sample-01.txt, sample-02.txt
Case Name Status Exec Time Memory
01-01.txt AC 1 ms 256 KB
01-02.txt AC 1 ms 256 KB
01-03.txt AC 1 ms 256 KB
01-04.txt AC 3 ms 256 KB
01-05.txt AC 1 ms 384 KB
01-06.txt AC 42 ms 8576 KB
01-07.txt AC 3 ms 256 KB
01-08.txt AC 27 ms 5376 KB
01-09.txt AC 45 ms 9088 KB
01-10.txt AC 45 ms 9088 KB
01-11.txt AC 45 ms 9088 KB
01-12.txt AC 45 ms 9088 KB
sample-01.txt AC 1 ms 256 KB
sample-02.txt AC 1 ms 256 KB