結果
| 問題 |
No.893 お客様を誘導せよ
|
| コンテスト | |
| ユーザー |
ate
|
| 提出日時 | 2019-11-06 14:03:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 505 bytes |
| コンパイル時間 | 2,255 ms |
| コンパイル使用メモリ | 204,904 KB |
| 最終ジャッジ日時 | 2025-01-08 02:21:41 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
6 | main(){
| ^~~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<(n);++i)
main(){
ll n;
cin>>n;
vector<ll> p(n);
vector<vector<ll>> a(n);
rep(i,n){
cin>>p[i];
a[i].resize(p[i]);
rep(j,p[i])cin>>a[i][j];
}
vector<vector<ll>> x(*max_element(p.begin(),p.end()));
rep(i,n){
rep(j,p[i])x[j].emplace_back(a[i][j]);
}
for(auto& v:x)sort(v.begin(),v.end());
for(auto y:x){
for(auto x:y){
cout<<x<<" ";
}
}
cout<<endl;
}
ate