답안 #457657

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
457657 2021-08-07T09:25:11 Z idas Coins (LMIO19_monetos) C++11
5.52805 / 100
16 ms 860 KB
#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin); i<(end); i++)
#define F first
#define S second
#define PB push_back
#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr)

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef map<int, int> mii;


const int N=310;
int ts, n, k1, k2, g[N][N];

void g1()
{
    FOR(i, 0, n)
    {
        FOR(j, 0, n)
        {
            if(i>=n/2) cout << 1 << " ";
            else cout << 0 << " ";
        }
        cout << '\n';
    }
}

void g2()
{
    FOR(i, 0, n)
    {
        FOR(j, 0, n)
        {
            if(j>=n/2) cout << 1 << " ";
            else cout << 0 << " ";
        }
        cout << '\n';
    }
}

void g3()
{
    FOR(i, 0, n-1) cout << 0 << " ";
    cout << 1 << '\n';
    FOR(i, 1, n-1)
    {
        FOR(j, 0, n)
        {
            if(j>=n/2){
                cout << 1 << " ";
            }
            else cout << 0 << " ";
        }
        cout << '\n';
    }
    cout << 0 << " ";
    FOR(i, 0, n-1) cout << 1 << " ";
}

int main()
{
    FAST_IO;
    cin >> ts >> n >> k1 >> k2;
    FOR(i, 0, n)
    {
        FOR(j, 0, n)
        {
            cin >> g[i][j];
        }
    }

    if(ts==1){
        g1();
    }
    else if(ts==2){
        g2();
    }
    else if(ts==3){
        g1();
    }
    else if(ts==4){
        g3();
    }
    else if(ts==5){
        g1();
    }
    else if(ts==6){
        g3();
    }
    else if(ts==7){
        g2();
    }
    else if(ts==8){
        g2();
    }
    else if(ts==9){
        g1();
    }
    else{
        g2();
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 332 KB K = 24
2 Incorrect 1 ms 332 KB K = 648
3 Partially correct 14 ms 844 KB K = 20313
4 Partially correct 14 ms 764 KB K = 23242
5 Incorrect 14 ms 848 KB K = 21462
6 Partially correct 14 ms 788 KB K = 22272
7 Incorrect 16 ms 852 KB K = 22837
8 Partially correct 14 ms 832 KB K = 20045
9 Incorrect 14 ms 792 KB K = 22541
10 Incorrect 16 ms 860 KB K = 22645