Submission #29669237


Source Code Expand

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)

Submission Info

Submission Time
Task B - Pasta
User gae1202
Language PyPy3 (7.3.0)
Score 200
Code Size 258 Byte
Status AC
Exec Time 64 ms
Memory 64276 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 20
Set Name Test Cases
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
Case Name Status Exec Time Memory
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