結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー sten_san
提出日時 2021-02-20 00:59:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 3,153 ms
コード長 894 bytes
コンパイル時間 2,197 ms
コンパイル使用メモリ 192,824 KB
最終ジャッジ日時 2025-01-19 02:22:53
ジャッジサーバーID
(参考情報)
judge5 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

struct iofast_t {
    iofast_t() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr); cout.tie(nullptr);
    }
} iofast;

struct uns_t {} uns;
template <typename Element, typename Head, typename ...Args>
auto vec(Element init, Head arg, Args ...args) {
    if constexpr (sizeof...(Args) == 0) return std::vector(arg, init);
    else return std::vector(arg, vec(init, args...));
}
template <typename Element, typename Head, typename ...Args>
auto vec(uns_t, Head arg, Args ...args) {
    return vec(Element(), arg, args...);
}

int main() {
    int v, d; cin >> v >> d;

    if (d == 1) {
        for (int i = 0; i < v; ++i) {
            cout << string(v, '1') << endl;
        }
        return 0;
    }

    cout << string(v, '1') << endl;
    for (int i = 1; i < v; ++i) {
        cout << '1' << string(v - 1, '0') << endl;
    }
}

0