結果

問題 No.893 お客様を誘導せよ
ユーザー suika_psuika_p
提出日時 2019-09-27 22:57:35
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 1,453 bytes
コンパイル時間 2,267 ms
コンパイル使用メモリ 171,336 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-10-25 05:32:50
合計ジャッジ時間 3,766 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = (int)(x); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
typedef long long ll;
typedef pair<int, int> P;
const int inf = INT_MAX;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill( (T*)array, (T*)(array+N), val ); }

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N; cin >> N;
    vector<vector<int>> a(N);
    rep(i, N) {
        int P; cin >> P;
        rep(j, P) {
            int t; cin >> t;
            a[i].pb(t);
        }
    }

    vector<int> b;
    int cnt = 1;
    rep(i, 100) {
        rep(j, N) {
            int t = a[j].size();
            if (t < cnt) {
                continue;
            }
            b.pb(a[j][i]);
        }
        cnt++;
    }
    rep(i, b.size()) cout << b[i] << ' ';
    cout << endl;
    return 0;
}
0