結果

問題 No.893 お客様を誘導せよ
ユーザー motimoti
提出日時 2020-02-24 20:38:35
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 1,294 bytes
コンパイル時間 1,833 ms
コンパイル使用メモリ 135,660 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-20 14:02:51
合計ジャッジ時間 2,416 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { std::cout << #a << " = " << a << "\n"; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
template<class T, class V> istream& operator>> (istream& ist, pair<T, V>& p) { return ist >> p.first >> p.second; }
template<class T> ostream& operator<< (ostream& ost, pair<T, T>& p) { return ost << p.first << ", " << p.second; }
template<class T> istream& operator>> (istream& ist, vector<T>& vs) { for(auto& e: vs) ist >> e; return ist; }

typedef long long ll;
int const inf = 1<<29;

int main() {
  int N; cin >> N;
  vector<vector<int>> A(N);
  rep(i, N) {
    int P; cin >> P;
    rep(j, P) {
      int a; cin >> a;
      A[i].push_back(a);
    }
  }
  bool first = 0;
  rep(i, 110) {
    rep(j, N) {
      if (i < A[j].size()) {
        if (first) {
          cout << " ";
        }
        cout << A[j][i];
        if (!first) {
          first = 1;
        }
      }
    }
  }
  cout << endl;
}
0