結果

問題 No.893 お客様を誘導せよ
ユーザー milanis48663220milanis48663220
提出日時 2019-09-27 21:33:02
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 593 bytes
コンパイル時間 592 ms
コンパイル使用メモリ 61,252 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 01:54:30
合計ジャッジ時間 2,058 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;

int P[1000];
int A[100][1000];
vector<int> ans;

int main(){
    int N;
    cin >> N;
    int cnt = 0;
    for(int i = 0; i < N; i++) {
        cin >> P[i];
        for(int j = 0; j < P[i]; j++){
            cin >> A[i][j];
            cnt++;
        }
    }
    for(int j = 0; j < 100; j++){
        for(int i = 0; i < N; i++){
            if(j < P[i]) {
                ans.push_back(A[i][j]);
            }
        }
    }
    for(int i = 0; i < cnt-1; i++){
        cout << ans[i] << ' ';
    }
    cout << ans[cnt-1] << endl;
}
0