結果
| 問題 | No.3727 Garden Master |
| コンテスト | |
| ユーザー |
てんぷら
|
| 提出日時 | 2026-09-19 14:05:28 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 17 ms / 2,000 ms |
| + 463µs | |
| コード長 | 1,108 bytes |
| 記録 | |
| コンパイル時間 | 2,579 ms |
| コンパイル使用メモリ | 338,988 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-09-19 14:05:42 |
| 合計ジャッジ時間 | 5,461 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef TEMPURA
#else
#define debug(...) ((void)0)
#define msg(...) ((void)0)
#endif
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
using ll = long long;
using ull = unsigned long long;
using i128 = __int128_t;
template <class T>
inline bool chmin(T &a, T b) {
if(a > b) {
a = b;
return true;
}
return false;
}
template <class T>
inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
// #include <atcoder/modint>
// using mint = atcoder::modint998244353;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector a(n, vector(n, 0)), b(n, vector(n, 0));
rep(i, n) rep(j, n) {
a[i][j] = i + 1;
b[i][j] = j + 1;
if((i + j) % 2 == 0) {
swap(a[i][j], b[i][j]);
}
}
rep(i, n) rep(j, n) cout << a[i][j] << " \n"[j + 1 == n];
rep(i, n) rep(j, n) cout << b[i][j] << " \n"[j + 1 == n];
return 0;
}
てんぷら