結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー mtsdmtsd
提出日時 2021-02-19 22:12:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 50 ms / 3,153 ms
コード長 1,558 bytes
コンパイル時間 955 ms
コンパイル使用メモリ 112,012 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-15 02:04:14
合計ジャッジ時間 20,486 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cstdint>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define MP make_pair
#define PB push_back
#define inf 1000000007
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}
 
template<class T> inline bool chmax(T &a, T b){
    if(a<b){
        a = b;
        return true;
    }
    return false;
}

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

int main(){
    int v,d;
    cin >> v >> d;
    if(d==1){
        rep(i,v){
            rep(j,v){
                cout << 1;
            }
            cout << "\n";
        }
        return 0;
    }
    rep(i,v){
        rep(j,v){
            if(i==0){
                cout << 1;
            }else{
                if(j==0){
                    cout << 1;
                }else{
                    cout << 0;
                }
            }
        }
        cout << "\n";
    }
    return 0;
}
0