結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー N_N_MochiN_N_Mochi
提出日時 2021-02-19 22:08:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 43 ms / 3,153 ms
コード長 1,231 bytes
コンパイル時間 1,697 ms
コンパイル使用メモリ 184,128 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-10-15 01:56:21
合計ジャッジ時間 21,372 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,352 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 1 ms
4,356 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 1 ms
4,352 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,356 KB
testcase_11 AC 1 ms
4,352 KB
testcase_12 AC 2 ms
4,352 KB
testcase_13 AC 1 ms
4,352 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 43 ms
4,352 KB
testcase_18 AC 43 ms
4,356 KB
testcase_19 AC 43 ms
4,348 KB
testcase_20 AC 43 ms
4,348 KB
testcase_21 AC 43 ms
4,348 KB
testcase_22 AC 42 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
//#include <atcoder/all>
using ll = long long;
using ld = long double;
#define FOR(i, a, b) for(ll i = (ll)(a); i < (ll)(b); i++)
#define rep(i, n) FOR(i, 0, n)
#define rFOR(i, a, b) for(ll i = (ll)(a - 1); i >= (ll)(b); i--)
#define rrep(i, a) rFOR(i, a, 0)
#define all(c) begin(c),end(c)
using namespace std;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
const ll MOD = 1000000007;
const ll MOD2 = 998244353;
const ld PI = acos(-1);
const ll INF = 1e18;
struct edge{ll to, cost;};

template <typename T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int V,D;
    cin >> V >> D;
    if(D==1){
        rep(i,V){
            rep(j,V){
                cout << 1;
            }
            cout << endl;
        }
    }
    else{
        rep(i,V){
            rep(j,V){
                cout << (min(i,j)==0?1:0);
            }
            cout << endl;
        }
    }
}
0