結果
| 問題 | No.3727 Garden Master |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-19 15:33:42 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 20 ms / 2,000 ms |
| + 594µs | |
| コード長 | 519 bytes |
| 記録 | |
| コンパイル時間 | 2,007 ms |
| コンパイル使用メモリ | 351,772 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-09-19 15:33:51 |
| 合計ジャッジ時間 | 4,753 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios_base::sync_with_stdio(0);
//start here
int N;cin >> N;
for(int i = 1;i <= N;i++){
for(int j = 1;j <= N;j++){
if((i+j)%2 == 0) cout << i << " ";
else cout << j << " ";
}
cout << '\n';
}
for(int i = 1;i <= N;i++){
for(int j = 1;j <= N;j++){
if((i+j)%2 == 1) cout << i << " ";
else cout << j << " ";
}
cout << '\n';
}
}