結果

問題 No.1399 すごろくで世界旅行 (構築)
ユーザー SSRSSSRS
提出日時 2021-02-19 21:56:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 1,516 ms
コンパイル使用メモリ 164,252 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-10-15 01:17:45
合計ジャッジ時間 22,855 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int V, D;
  cin >> V >> D;
  if (D == 1){
    for (int i = 0; i < V; i++){
      for (int j = 0; j < V; j++){
        if (i == j){
          cout << 0;
        } else {
          cout << 1;
        }
      }
      cout << endl;
    }
  } else {
    for (int i = 0; i < V; i++){
      for (int j = 0; j < V; j++){
        if (i == 0 || j == 0){
          cout << 1;
        } else {
          cout << 0;
        }
      }
      cout << endl;
    }
  }
}
0