結果
| 問題 | No.3649 Top View of Jenga |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-28 21:30:08 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 535µs | |
| コード長 | 1,146 bytes |
| 記録 | |
| コンパイル時間 | 2,327 ms |
| コンパイル使用メモリ | 335,416 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-28 21:30:23 |
| 合計ジャッジ時間 | 3,574 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,s,n) for (int i = (s); i < (n); ++i)
#define rrep(i,g,n) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define len(x) (int)(x).size()
#define dup(x,y) (((x)+(y)-1)/(y))
#define pb push_back
#define eb emplace_back
#define Field(T) vector<vector<T>>
using namespace std;
using ll = long long;
using ull = unsigned long long;
template<typename T> using pq = priority_queue<T,vector<T>,greater<T>>;
using P = pair<int,int>;
template<class T>bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T&a,T b){if(b<a){a=b;return 1;}return 0;}
int main() {
ll n;
cin >> n;
vector<vector<ll>> ans(3, vector<ll>(3, (n/6)*2));
n %= 6;
if (n >= 1) ++ans[0][0], ++ans[1][0], ++ans[2][0];
if (n >= 2) ++ans[0][1], ++ans[1][1], ++ans[2][1];
if (n >= 3) ++ans[0][2], ++ans[1][2], ++ans[2][2];
if (n >= 4) ++ans[0][0], ++ans[0][1], ++ans[0][2];
if (n >= 5) ++ans[1][0], ++ans[1][1], ++ans[1][2];
rep(i,0,3) {
rep(j,0,3) cout << ans[i][j] << " ";
cout << endl;
}
return 0;
}