結果

問題 No.893 お客様を誘導せよ
ユーザー kappybarkappybar
提出日時 2020-04-07 11:28:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 580 bytes
コンパイル時間 1,858 ms
コンパイル使用メモリ 168,896 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-21 17:19:28
合計ジャッジ時間 3,025 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll =  long long ;
using P = pair<int,int> ;
const int INF = 1e9;
const int MOD = 1000000007;
int n = 1005;
int p = 105;
vector<vector<int>> people(n,vector<int>(p,0));

int main(){
    cin >> n;
    rep(i,n){
        int p_;
        cin >> p_;
        rep(j,p_) cin >> people[i][j];
    }
    vector<int> ans;
    rep(j,p)rep(i,n){
        if(people[i][j] == 0) continue;
        ans.push_back(people[i][j]);
    }
    
    for(int k:ans) cout << k << " ";
    cout << endl;
    return 0;
}
0