結果

問題 No.893 お客様を誘導せよ
ユーザー kappybar
提出日時 2020-04-07 11:28:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 580 bytes
コンパイル時間 1,679 ms
コンパイル使用メモリ 173,064 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 10:58:33
合計ジャッジ時間 2,685 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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