結果
| 問題 | No.3649 Top View of Jenga |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-28 22:31:22 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 471µs | |
| コード長 | 659 bytes |
| 記録 | |
| コンパイル時間 | 2,153 ms |
| コンパイル使用メモリ | 335,696 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-28 22:31:26 |
| 合計ジャッジ時間 | 3,510 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll n;
cin >> n;
vector a(3, vector<ll>(3, n / 3));
int d = n % 3;
if (n / 3 % 2 == 0) {
if (d >= 1)
rep(i, 3) a[i][0]++;
if (d >= 2)
rep(i, 3) a[i][1]++;
} else {
if (d >= 1)
rep(i, 3) a[0][i]++;
if (d >= 2)
rep(i, 3) a[1][i]++;
}
rep(i, 3) {
rep(j, 3) {
cout << a[i][j] << " ";
}
cout << endl;
}
return 0;
}