結果

問題 No.893 お客様を誘導せよ
ユーザー 0w10w1
提出日時 2019-09-28 03:00:25
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 531 bytes
コンパイル時間 2,712 ms
コンパイル使用メモリ 205,400 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-10-25 23:51:00
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 6 ms
4,348 KB
testcase_03 AC 17 ms
4,348 KB
testcase_04 AC 17 ms
4,348 KB
testcase_05 AC 16 ms
4,348 KB
testcase_06 AC 12 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 34 ms
4,368 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;

  vector<vector<int>> A(N);
  for (int i = 0; i < N; ++i) {
    int P;
    cin >> P;
    A[i].resize(P);
    for (int j = 0; j < P; ++j) {
      cin >> A[i][j];
    }
  }

  vector<int> ans;
  for (int j = 0; j < 100; ++j) {
    for (int i = 0; i < N; ++i) {
      if (A[i].size() > j) {
        ans.push_back(A[i][j]);
      }
    }
  }

  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << " \n"[i + 1 == ans.size()];
  }

  return 0;
}
0