提出 #31262319


ソースコード 拡げる

n, m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
while len(a) + len(b) > 0:
    if len(a) == 0:
        c += b
        b = []
    elif len(b) == 0:
        c += a
        a = []
    elif a[0] > b[0]:
        c += [b[0]]
        b = b[1 :]
    else:
        c += [a[0]]
        a = a[1 :]
for c_i in c:
    print(c_i)

提出情報

提出日時
問題 C - マージ (Merge)
ユーザ Pro_ktmr
言語 PyPy3 (7.3.0)
得点 100
コード長 397 Byte
結果 AC
実行時間 67 ms
メモリ 70048 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 12
セット名 テストケース
Sample sample-01.txt, sample-02.txt
All 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, sample-01.txt, sample-02.txt
ケース名 結果 実行時間 メモリ
01-01.txt AC 67 ms 64808 KiB
01-02.txt AC 60 ms 63996 KiB
01-03.txt AC 55 ms 65068 KiB
01-04.txt AC 57 ms 64892 KiB
01-05.txt AC 53 ms 63372 KiB
01-06.txt AC 51 ms 63388 KiB
01-07.txt AC 66 ms 69684 KiB
01-08.txt AC 63 ms 69092 KiB
01-09.txt AC 63 ms 70044 KiB
01-10.txt AC 65 ms 70048 KiB
sample-01.txt AC 57 ms 61656 KiB
sample-02.txt AC 46 ms 61768 KiB