結果

問題 No.893 お客様を誘導せよ
ユーザー magmag
提出日時 2020-06-19 06:28:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 910 bytes
コンパイル時間 1,458 ms
コンパイル使用メモリ 168,612 KB
実行使用メモリ 11,972 KB
最終ジャッジ日時 2023-09-16 12:37:58
合計ジャッジ時間 8,066 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;
using ll=long long;
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) rep2(i,0,n)

int main(){
  cin.tie(nullptr);ios_base::sync_with_stdio(false);
  int n;cin>>n;
  vector<vector<int>> vec(n,vector<int>(101,0));
  int p,a[n];
  rep(i,n){
    cin>>p;
    a[i]=p;
    rep(j,p){
      cin>>vec[i][j];
    }
  } 
  //$BM6F3$O0J2<$N%k!<%k$K4p$E$$$F9T$o$l$^$9!#(B
  //1 $BA`:n!'$"$k%l%8$K$D$$$F!"$=$N%l%8$KJB$V@hF,$N$*5RMM$r?M$N<j$G@:;;$r9T$&(B
  //$B%l%8$N:G8eHx$KM6F3$9$k!#$3$l$K$h$j!"#2HVL\$N$*5RMM$,@hF,$K$J$k!#(B
  //2$BA`:n$r!"%l%8HV9f$N<c$$=g$K9T$&!#%l%8HV9f(B N $B$^$G=*$o$l$P!"$^$?(B1$B$KLa$k(B
  //3$B0J>e$rA4$F$N$*5RMM$,0\F0$7=*$o$k$^$G9T$&!#(B
  int j=0,cnt;
  while(1){
    cnt=0;
    rep(i,a[i]){
      if(j<a[i])cout<<vec[i][j]<<" ";
      else if(j>=a[i])cnt++;
    }
    j++;
    if(cnt==n)break;
  }
  cout<<endl;
}
0