結果
| 問題 | No.3727 Garden Master |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-15 16:07:20 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,640 bytes |
| 記録 | |
| コンパイル時間 | 2,917 ms |
| コンパイル使用メモリ | 249,128 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-15 16:07:38 |
| 合計ジャッジ時間 | 6,703 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 30 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, p, n) for (ll i = p; i < (ll)(n); i++)
#define rep2(i, p, n) for (ll i = p; i >= (ll)(n); i--)
using namespace std;
using ll = long long;
using ld = long double;
const double pi = 3.141592653589793;
const long long inf = 2 * 1e9;
const long long linf = (1LL << 61);
const ll mod1 = 1000000007;
const ll mod2 = 998244353;
template <class T>
inline bool chmax(T &a, T b)
{
if (a < b)
{
a = b;
return 1;
}
return 0;
}
template <class T>
inline bool chmin(T &a, T b)
{
if (a > b)
{
a = b;
return 1;
}
return 0;
}
template <class T>
using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>;
#include <atcoder/all>
using namespace atcoder;
using mint1 = modint1000000007;
using mint2 = modint998244353;
vector<pair<ll, ll>> base = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}};
void solve()
{
ll n;
cin >> n;
ll A[n][n], B[n][n];
rep(i, 0, n)
{
rep(j, 0, n)
{
A[i][j] = i;
B[i][j] = j;
if ((i + j) % 2 == 0)
{
swap(A[i][j], B[i][j]);
}
}
}
rep(i, 0, n)
{
rep(j, 0, n)
{
cout << A[i][j] << " ";
}
cout << endl;
}
rep(i, 0, n)
{
rep(j, 0, n)
{
cout << B[i][j] << " ";
}
cout << endl;
}
}
int main()
{
//////////////////
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
//////////////////
// ll T;
// cin >> T;
// while (T--)
solve();
return 0;
}