提出 #63313001


ソースコード 拡げる

#include <iostream>
using namespace std;

int main() {
    int N;
    cin >> N;
    int a[N+5][N+5];

   
    for (int i = 1; i <= N; i++) {
        for (int j = 1; j <= N; j++) {
            a[i][j] = 0;
        }
    }

  
    for (int i = 1; i <= N; i++) {
        int l = N + 1 - i;
        if (i > l) break; 
        for (int p = i; p <= l; p++) {
            for (int q = i; q <= l; q++) {
                a[p][q]++;
            }
        }
    }

 
    for (int i = 1; i <= N; i++) {
        for (int j = 1; j <= N; j++) {
            if (a[i][j] % 2 == 0) {
                cout << '.' ;
            } else {
                cout << '#' ;
            }
        }
        cout << endl;
    }

    return 0;
}

提出情報

提出日時
問題 B - Make Target
ユーザ Crow_000
言語 C++ 20 (gcc 12.2)
得点 200
コード長 754 Byte
結果 AC
実行時間 1 ms
メモリ 3644 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 20
セット名 テストケース
Sample 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt
All 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt, 01-random-001.txt, 01-random-002.txt, 01-random-003.txt, 01-random-004.txt, 01-random-005.txt, 01-random-006.txt, 01-random-007.txt, 01-random-008.txt, 01-random-009.txt, 01-random-010.txt, 01-random-011.txt, 01-random-012.txt, 01-random-013.txt, 01-random-014.txt, 01-random-015.txt, 01-random-016.txt
ケース名 結果 実行時間 メモリ
00-sample-001.txt AC 1 ms 3564 KiB
00-sample-002.txt AC 1 ms 3504 KiB
00-sample-003.txt AC 1 ms 3644 KiB
00-sample-004.txt AC 1 ms 3460 KiB
01-random-001.txt AC 1 ms 3568 KiB
01-random-002.txt AC 1 ms 3576 KiB
01-random-003.txt AC 1 ms 3556 KiB
01-random-004.txt AC 1 ms 3508 KiB
01-random-005.txt AC 1 ms 3580 KiB
01-random-006.txt AC 1 ms 3516 KiB
01-random-007.txt AC 1 ms 3476 KiB
01-random-008.txt AC 1 ms 3572 KiB
01-random-009.txt AC 1 ms 3512 KiB
01-random-010.txt AC 1 ms 3488 KiB
01-random-011.txt AC 1 ms 3448 KiB
01-random-012.txt AC 1 ms 3512 KiB
01-random-013.txt AC 1 ms 3492 KiB
01-random-014.txt AC 1 ms 3500 KiB
01-random-015.txt AC 1 ms 3496 KiB
01-random-016.txt AC 1 ms 3620 KiB