Submission #7636716


Source Code Expand

Copy
#include <bits/stdc++.h>
#define int long
#define ll long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define IOS cin.tie(0); ios::sync_with_stdio(false)
using namespace std;
int gcd(int a,int b){return b ? gcd(b,a%b) : a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}

main() {
    int H,W; cin >> H >> W;
    int A,B; cin >> A >> B;
    string S,T;
    rep(i,W){
        if(A>i){
            S.push_back('1');
        }
        else S.push_back('0');
    }
    rep(i,W){
        if(S[i]=='0') T.push_back('1');
        else T.push_back('0');
    }
    rep(i,H){
        if(B>i){
            rep(j,W){
                cout << S[j] << (j==W-1 ? "" : " ");
            }
        }
        else {
            rep(j,W){
                cout << T[j] << (j==W-1 ? "" : " ");
            }
        }
        cout << endl;
    }
}

Submission Info

Submission Time
Task A - 01 Matrix
User paotan
Language C++14 (GCC 5.4.1)
Score 0
Code Size 863 Byte
Status WA
Exec Time 63 ms
Memory 2176 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
WA × 2
AC × 3
WA × 11
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 WA 1 ms 256 KB
01-03.txt WA 1 ms 256 KB
01-04.txt AC 3 ms 256 KB
01-05.txt WA 2 ms 256 KB
01-06.txt WA 59 ms 2048 KB
01-07.txt AC 3 ms 256 KB
01-08.txt WA 37 ms 1408 KB
01-09.txt WA 63 ms 2176 KB
01-10.txt WA 63 ms 2176 KB
01-11.txt WA 63 ms 2176 KB
01-12.txt WA 63 ms 2176 KB
sample-01.txt WA 1 ms 256 KB
sample-02.txt WA 1 ms 256 KB