結果
問題 | No.893 お客様を誘導せよ |
ユーザー |
|
提出日時 | 2021-06-27 20:40:35 |
言語 | Swift (6.0.3) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 1,340 ms |
コンパイル使用メモリ | 134,816 KB |
実行使用メモリ | 13,196 KB |
最終ジャッジ日時 | 2024-06-25 11:56:00 |
合計ジャッジ時間 | 3,020 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
let n = Int(readLine()!)! var l = [[Int]]() var m = 0 for i in 0..<n{ l += [readLine()!.split(separator: " ").map{Int($0)!}] m += l[i][0] l[i].removeFirst() } l += [[]] while l[n].count < m{ for i in 0..<n{ if !l[i].isEmpty{ l[n] += [l[i].removeFirst()] } } } print(l[n].map{String($0)}.joined(separator: " "))