結果

問題 No.893 お客様を誘導せよ
ユーザー lotuslotus
提出日時 2019-09-27 22:02:01
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 916 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 19:03:55
合計ジャッジ時間 1,683 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
#include<math.h>

using namespace std;

#define INF 1000000007
#define LINF (1LL << 62)

typedef long long i64;
typedef pair<i64,i64> P;


int n, m[1010];
queue<int> a[1010];

int main(){
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> m[i];
		for(int j = 0; j < m[i]; j++){
			int c;
			cin >> c;
			a[i].push(c);
		}
	}
	for(int j = 0; j < 101; j++){
		for(int i = 0; i < n; i++){
			if(a[i].empty()) continue;
			cout << a[i].front() << " ";
			a[i].pop();
		}
	}
	cout << endl;
	
	return 0;
}
0