結果

問題 No.3727 Garden Master
コンテスト
ユーザー downer
提出日時 2026-09-19 14:49:42
言語 Text
(fcat)
コンパイル:
true
実行:
/usr/bin/fcat _filename_
結果
WA  
実行時間 -
コード長 696 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 23 ms
コンパイル使用メモリ 7,852 KB
実行使用メモリ 9,916 KB
最終ジャッジ日時 2026-09-19 14:49:45
合計ジャッジ時間 1,677 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge4_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

-1#include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    int N;
    cin >> N;
    for(int i = 0; i < N; i++) {
        for(int j = 0; j < N; j++) {
            if((i + j) % 2 == 0) {
                cout << i + 1 << " ";
            }
            else {
                cout << j + 1 << " ";
            }
        }
        cout << "\n";
    }

    for(int i = 0; i < N; i++) {
        for(int j = 0; j < N; j++) {
            if((i + j) % 2 == 0) {
                cout << j + 1 << " ";
            }
            else {
                cout << i + 1 << " ";
            }
        }
        cout << "\n";
    }

    return 0;
}
0