結果

問題 No.3729 I Hate Hexagonal Tiling
コンテスト
ユーザー てんぷら
提出日時 2026-09-19 14:12:03
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 4 ms / 2,000 ms
+ 834µs
コード長 874 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,864 ms
コンパイル使用メモリ 333,100 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-19 14:12:35
合計ジャッジ時間 3,894 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;
    rep(i, n) {
        int r = 2 - i % 3;
        rep(j, i + 1) cout << 1 + (j % 3 == r) << " \n"[j == i];
    }
}
0