結果

問題 No.893 お客様を誘導せよ
ユーザー MaboyMaboy
提出日時 2021-06-27 20:40:35
言語 Swift
(5.10.0)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 2,174 ms
コンパイル使用メモリ 137,328 KB
実行使用メモリ 12,028 KB
最終ジャッジ日時 2023-09-07 18:08:41
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,128 KB
testcase_01 AC 3 ms
8,188 KB
testcase_02 AC 21 ms
8,512 KB
testcase_03 AC 72 ms
9,676 KB
testcase_04 AC 72 ms
9,584 KB
testcase_05 AC 66 ms
9,632 KB
testcase_06 AC 45 ms
9,060 KB
testcase_07 AC 3 ms
8,120 KB
testcase_08 AC 149 ms
12,028 KB
testcase_09 AC 6 ms
8,272 KB
testcase_10 AC 4 ms
8,104 KB
testcase_11 AC 5 ms
8,336 KB
testcase_12 AC 7 ms
8,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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: " "))
0