提出 #29669237


ソースコード 拡げる

N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = "Yes"
for i in range(M):
    l = B[i]
    if l in A:
        A.pop(A.index(l))
    else:
        ans = "No"
        break
print(ans)

提出情報

提出日時
問題 B - Pasta
ユーザ gae1202
言語 PyPy3 (7.3.0)
得点 200
コード長 258 Byte
結果 AC
実行時間 64 ms
メモリ 64276 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 20
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_b_00.txt, random_b_01.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 64 ms 61532 KiB
example_01.txt AC 47 ms 61360 KiB
example_02.txt AC 49 ms 61444 KiB
hand_00.txt AC 54 ms 64196 KiB
hand_01.txt AC 51 ms 64244 KiB
hand_02.txt AC 50 ms 63844 KiB
hand_03.txt AC 50 ms 61716 KiB
hand_04.txt AC 47 ms 61488 KiB
random_00.txt AC 49 ms 63824 KiB
random_01.txt AC 55 ms 63988 KiB
random_02.txt AC 53 ms 64092 KiB
random_03.txt AC 50 ms 63768 KiB
random_04.txt AC 50 ms 64196 KiB
random_05.txt AC 49 ms 63920 KiB
random_06.txt AC 51 ms 64112 KiB
random_07.txt AC 51 ms 64184 KiB
random_08.txt AC 52 ms 63836 KiB
random_09.txt AC 52 ms 64276 KiB
random_b_00.txt AC 53 ms 64212 KiB
random_b_01.txt AC 51 ms 63528 KiB