結果

問題 No.893 お客様を誘導せよ
ユーザー michonz4michonz4
提出日時 2020-01-04 12:31:15
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 460 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 29,016 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-14 20:01:28
合計ジャッジ時間 1,187 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 9 ms
4,380 KB
testcase_04 AC 8 ms
4,380 KB
testcase_05 AC 8 ms
4,376 KB
testcase_06 AC 6 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 18 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
  int n, max=0;
  scanf("%d", &n);
  int arr[n][100];
  for (int i=0; i<n; i++) {
    for (int j=0; j<100; j++) arr[i][j]=0;
  }

  for (int i=0; i<n; i++) {
    int reg;
    scanf("%d", &reg);
    if (reg>max) max=reg;
    for (int j=0; j<reg; j++) {
      scanf("%d", &arr[i][j]);
    }
  }

  for (int x=0; x<max; x++) {
    for (int y=0; y<n; y++) {
      if (arr[y][x]!=0) printf("%d ", arr[y][x]);
    }
  }
  return 0;
}
0