結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 3 ms
4,376 KB
testcase_03 AC 10 ms
4,376 KB
testcase_04 AC 10 ms
4,376 KB
testcase_05 AC 9 ms
4,376 KB
testcase_06 AC 7 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 20 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,376 KB
testcase_12 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main() {
  int n, max=0;
  scanf("%d", &n);
  int arr[100000]={};

  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*n]);
    }
  }

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