結果

問題 No.893 お客様を誘導せよ
ユーザー snow39snow39
提出日時 2019-09-27 21:28:10
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 756 bytes
コンパイル時間 899 ms
コンパイル使用メモリ 98,580 KB
実行使用メモリ 4,432 KB
最終ジャッジ日時 2023-10-25 01:46:45
合計ジャッジ時間 1,604 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;

int main(){
  int N;
  cin>>N;
  vector<int> P(N);
  vector<vector<int>> A(N,vector<int> (101,0));
  for(int i=0;i<N;i++){
    cin>>P[i];
    for(int j=0;j<P[i];j++) cin>>A[i][j];
  }

  vector<int> ans;
  for(int j=0;j<101;j++){
    for(int i=0;i<N;i++){
      if(A[i][j]==0) continue;
      ans.push_back(A[i][j]);
    }
  }

  cout<<ans[0];
  for(int i=1;i<ans.size();i++) cout<<" "<<ans[i];
  cout<<endl;

  return 0;
}
0