ZhenlongDai/ACPR huggingface dataset:
Problem: p00105
Buggy submission (Python3, verdict: Wrong Answer):
import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
	if c=='18':break
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*b)

Failing test case input:
style 12
even 25
introduction 3
easy 9
style 9
tnemucod 13
style 21
even 10

Expected output:
easy
9
even
10 25
introduction
3
style
9 12 21
tnemucod
13


Actual output:
easy
9
even
25 10
introduction
3
style
12 9 21
tnemucod
13


Fixed submission (verdict: Accepted):
import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*sorted(map(int,b)))

Problem: p00105
Buggy submission (Python3, verdict: Wrong Answer):
dic = {}
while True:
    try:
        word, pgn = input().split()

        if word in dic.keys():
            dic[word].append(int(pgn))
        else:
            dic[word] = [int(pgn)]
    except:
        break

for k, v in dic.items():
    print(k)
    print(' '.join(map(str, sorted(v))))

Failing test case input:
stzle 16
veen 0
nntroductioi 6
y_fs 1
style 17
tndmucod 13
styld 7
nuee 3

Expected output:
nntroductioi
6
nuee
3
styld
7
style
17
stzle
16
tndmucod
13
veen
0
y_fs
1


Actual output:
stzle
16
veen
0
nntroductioi
6
y_fs
1
style
17
tndmucod
13
styld
7
nuee
3


Fixed submission (verdict: Accepted):
dic = {}
while True:
    try:
        word, pgn = input().split()

        if word in dic.keys():
            dic[word].append(int(pgn))
        else:
            dic[word] = [int(pgn)]
    except:
        break

for k, v in sorted(dic.items()):
    print(k)
    print(' '.join(map(str, sorted(v))))

Problem: p00105
Buggy submission (Python3, verdict: Wrong Answer):
import sys
l=[i.split() for i in sys.stdin]
d={}
for i in l:
  if i[0] not in d:
    d[i[0]]=[i[1]]
  else:
    d[i[0]].append(i[1])
for i in sorted(d.keys()):
  print(i)
  print(" ".join(d[i]))


Failing test case input:
style 12
even 25
introduction 3
e`sy 9
style 17
tnemucod 13
elyts 7
even 13

Expected output:
e`sy
9
elyts
7
even
13 25
introduction
3
style
12 17
tnemucod
13


Actual output:
e`sy
9
elyts
7
even
25 13
introduction
3
style
12 17
tnemucod
13


Fixed submission (verdict: Accepted):
import sys
l=[i.split() for i in sys.stdin]
d={}
for i in l:
  if i[0] not in d:
    d[i[0]]=[i[1]]
  else:
    d[i[0]].append(i[1])
for i in sorted(d.keys()):
  print(i)
  d[i]=list(map(int,d[i]))
  print(" ".join(map(str,sorted(d[i]))))
Problem: p00105
Buggy submission (Python3, verdict: Wrong Answer):
dic = {}
while True:
    try:
        word, pgn = input().split()
    except:
        break

    if word in dic.keys():
        dic[word].append(int(pgn))
    else:
        dic[word] = [int(pgn)]
for k, v in dic.items():
    print(k)
    print(' '.join(map(str, sorted(v))))

Failing test case input:
style 16
even 25
introduction 6
e`ys 3
style 17
tnemucod 13
styld 7
nuee 25

Expected output:
e`ys
3
even
25
introduction
6
nuee
25
styld
7
style
16 17
tnemucod
13


Actual output:
style
16 17
even
25
introduction
6
e`ys
3
tnemucod
13
styld
7
nuee
25


Fixed submission (verdict: Accepted):
dic = {}
while True:
    try:
        word, pgn = input().split()

        if word in dic.keys():
            dic[word].append(int(pgn))
        else:
            dic[word] = [int(pgn)]
    except:
        break

for k, v in sorted(dic.items()):
    print(k)
    print(' '.join(map(str, sorted(v))))
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N=int(input())
d=list(map(int,input().split()))
D=Counter(d)
M=int(input())
t=list(map(int,input().split()))
T=Counter(t)
for key,value in T.items():
    if D[key]<value or key not in D.keys():
        print("No")
        exit()
else:
    print("Yes")


Failing test case input:
15
1 2 2 3 4 3 4 4 8 6 5 3 5 5 7
9
7 4 3 2 1 2 3 8 5

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
import collections
 
n = int(input())
ln = list(map(int, input().split()))
m = int(input())
lm = list(map(int, input().split()))
 
c1 = collections.Counter(lm)
c2 = collections.Counter(ln)
 
for i in c1.keys():
    if c2[i] < c1[i]:
        print("NO")
        exit()
 
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))
    Dcounter = collections.Counter(D)
    Tcounter = collections.Counter(T)
    for t in T:
        if Dcounter[t] - Tcounter[t] < 0:
            print('No')
            return
    print('Yes')

if __name__ == "__main__":
    main()


Failing test case input:
7
100 200 500 700 238 2562 2000
8
100 200 500 337 499 1600

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))
    Dcounter = collections.Counter(D)
    Tcounter = collections.Counter(T)
    for t in T:
        if Dcounter[t] - Tcounter[t] < 0:
            print('NO')
            return
    print('YES')

if __name__ == "__main__":
    main()

Problem: p03578
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))

D.sort()
T.sort()
ans = 'YES'

if (len(D) >= len(T)):
  for i in range(len(T)):
    if (D[i] != T[i]):
      ans = 'NO'
      break
else:
  ans = 'NO'
print(ans)
      

Failing test case input:
15
1 2 2 3 4 3 4 4 8 6 5 3 5 5 7
9
7 4 3 2 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
import collections

N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))

c_d = dict(collections.Counter(D))
c_t = dict(collections.Counter(T))
ans = 'YES'

for k,v in c_t.items():
  if (k in c_d and c_t[k] <= c_d[k]):
    continue
  else:
    ans = 'NO'
    break
print(ans)
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dicD = {}
dicT = {}

for d in D:
    if d not in dicD:
        dicD[d] = 0
    dicD[d] += 1

for t in T:
    if t not in dicT:
        dicT[t] = 0
    dicT[t] += 1

for t in dicT:
    if t not in dicD:
        print("NO")
    elif dicT[t] > dicD[t]:
        print("NO")
else:
    print("YES")

Failing test case input:
1
9
2
010 000 111 011 101

Expected output:
NO


Actual output:
NO
NO
NO
NO
NO
YES


Fixed submission (verdict: Accepted):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dicD = {}
dicT = {}

for d in D:
    if d not in dicD:
        dicD[d] = 0
    dicD[d] += 1

for t in T:
    if t not in dicT:
        dicT[t] = 0
    dicT[t] += 1

for t in dicT:
    if t not in dicD:
        print("NO")
        break
    elif dicT[t] > dicD[t]:
        print("NO")
        break
else:
    print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter 

N=int(input())
C = Counter(list(map(int,input().split())))
M = Counter(list(map(int,input().split())))
for key in M.keys():
  if C[key]<M[key]:
    print("NO")
    break
else:
  print("YES")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 2 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter 

N=int(input())
C = Counter(list(map(int,input().split())))
O=int(input())
M = Counter(list(map(int,input().split())))
for key in M.keys():
  if C[key]<M[key]:
    print("NO")
    break
else:
  print("YES")

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    d = list(map(int, input().split()))
    m = int(input())
    t = list(map(int, input().split()))
    t = collections.Counter(t)
    for i in t:
        if t[i] > d.count(i):
            print("NO")
    else:
        print("YES")
    return 0

if __name__ == "__main__":
    solve()

Failing test case input:
1
9
4
110 000 111 011 101

Expected output:
NO


Actual output:
NO
NO
NO
NO
NO
YES


Fixed submission (verdict: Accepted):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    d = list(map(int, input().split()))
    m = int(input())
    t = list(map(int, input().split()))
    t = collections.Counter(t)
    d = collections.Counter(d)
    for i in t:
        if t[i] > d[i]:
            print("NO")
            break
    else:
        print("YES")
    return 0

if __name__ == "__main__":
    solve()
Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from os import remove


n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

for i in range(m):
    if t_list[i] in d_list:
        t_list[i] = 0
    else:
        print("No")
        exit()

print("Yes")

Failing test case input:
7
010 64 531 700 341 6869 2004
2
100 200 500 365 499 4705

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("NO")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[i]:
        continue
    else:
        print("NO")
        exit()

print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

dic_D = {} 
for d in D:
    dic_D[d] = dic_D.get(d,0) + 1
dic_T = {}
for t in T:
    dic_T[t] = dic_T.get(t,0) + 1
    
for k in dic_T:
    if dic_T[k]>dic_D.get(k,0):
        print("YES")
        break
else:
    print("NO")


Failing test case input:
7
000 64 531 700 238 3462 2000
14
100 200 500 337 499 2833

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

dic_D = {} 
for d in D:
    dic_D[d] = dic_D.get(d,0) + 1
dic_T = {}
for t in T:
    dic_T[t] = dic_T.get(t,0) + 1
    
for k in dic_T:
    if dic_T[k]>dic_D.get(k,0):
        print("NO") 
        break
else:
    print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    cD = collections.Counter(D)
    cT = collections.Counter(T)

    for k, v in cT.items():
        if k not in cD:
            print("No")
            exit()
        else:
            if v > cD[k]:
                print("No")
                exit()

    print("Yes")


if __name__ == "__main__":
    main()

Failing test case input:
1
9
2
010 000 111 011 101

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    cD = dict(collections.Counter(D))
    cT = dict(collections.Counter(T))

    for k, v in cT.items():
        if k not in cD:
            print("NO")
            exit()
        else:
            if v > cD[k]:
                print("NO")
                exit()

    print("YES")


if __name__ == "__main__":
    main()
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n=int(input())
ln=list(map(int,input().split()))
m=int(input())
lm=list(map(int,input().split()))
d=dict(Counter(ln))
for i in lm:
    try:
        if d[i]>=1:d[i]-=1
        else:print("NO");exit()
    except:print("NO");exit()
print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
NO
NO


Fixed submission (verdict: Accepted):
from collections import Counter
n=int(input())
ln=list(map(int,input().split()))
m=int(input())
lm=list(map(int,input().split()))
d=dict(Counter(ln))
ans="YES"
for i in lm:
    try:
        if d[i]>=1:d[i]-=1
        else:ans="NO"
    except:ans="NO"
print(ans)

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

N = int(input())
D = collections.Counter(list(map(int,input().split())))
M = int(input())
T = list(map(int,input().split()))

if M > N :
    print("No")


for i in range(M):
    
    if D[T[i]] == 0:
        print("NO")
        exit()
    D[T[i]] -= 1
    
    
print("YES")

Failing test case input:
1
9
8
110 000 111 011 101

Expected output:
NO


Actual output:
No
NO


Fixed submission (verdict: Accepted):
import collections

N = int(input())
D = collections.Counter(list(map(int,input().split())))
M = int(input())
T = list(map(int,input().split()))

if M > N :
    print("NO")
    exit()


for i in range(M):
    
    if D[T[i]] == 0:
        print("NO")
        exit()
    D[T[i]] -= 1
    
    
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Dstart = 0
flag = True

for i in T:
    for j in D[Dstart:]:
        Dstart += 1
        if i == j:
            break
    if Dstart == N:
        flag = False
        break

print("YES" if flag else "NO")

Failing test case input:
5
3 1 4 1 5
3
5 4 3

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Tindex = 0
flag = False

for i in D:
    if i == T[Tindex]:
        Tindex += 1
        if Tindex == M:
            flag = True
            break

print("YES" if flag else "NO")
Problem: p03578
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def main():
    n = int(input())
    ddic = {}
    tlis = []
    dlis = list(map(int, input().split()))
    m = int(input())
    tlis = list(map(int, input().split()))
    for d in dlis:
        if d in ddic:
            ddic[d] += 1
        else:
            ddic[d] = 0
    for t in tlis:
        if t in ddic:
            
            ddic[t] -= 1
        else:
            
            print("NO")
            exit()
    print("YES")


if __name__ == "__main__":
    main()

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    ddic = {}
    tlis = []
    dlis = list(map(int, input().split()))
    m = int(input())
    tlis = list(map(int, input().split()))
    for d in dlis:
        if d in ddic:
            ddic[d] += 1
        else:
            ddic[d] = 0
    for t in tlis:
        if t in ddic and ddic[t] >= 0:
            
            ddic[t] -= 1
        else:
            
            print("NO")
            exit()
    print("YES")


if __name__ == "__main__":
    main()

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
D.sort()
T.sort()
i = 0
j = 0
while True:
    if i >= len(T) or j >= len(D):
        break
    ans = 0
    while True:
        if j >= len(D):
            break
        if T[i] == D[j]:
            ans = 1
            j += 1
            break
        j += 1
    if ans == 0:
        break
    i += 1
            
if ans == 1:
    print("Yes")
elif ans == 0:
    print("No")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
D.sort()
T.sort()
i = 0
j = 0
while True:
    if i >= len(T) or j >= len(D):
        break
    ans = 0
    while True:
        if j >= len(D):
            break
        if T[i] == D[j]:
            ans = 1
            j += 1
            break
        j += 1
    if ans == 0:
        break
    i += 1
            
if ans == 1:
    print("YES")
elif ans == 0:
    print("NO")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]

d = sorted(d)
t = sorted(t)

left = 0
ans = 'YES'
for i in range(m):
    if t[i] < d[left]:
        ans='NO'
        break
    elif t[i] == d[left]:
        left+=1
        if i!= m-1 and left >=n:
            ans = 'NO'
            break
    else:
        while t[i] != d[left]:
            left+=1
            if left == n:
                break
        if left==n:
            ans = 'NO'
            break
print(ans)

Failing test case input:
7
100 200 500 700 1200 1600 2000
6
100 200 500 700 1600 1600

Expected output:
NO

Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]

d = sorted(d)
t = sorted(t)

left = 0
ans = 'YES'
for i in range(m):
    if t[i] < d[left]:
        ans='NO'
        break
    elif t[i] == d[left]:
        left+=1
        if i!= m-1 and left >=n:
            ans = 'NO'
            break
    else:
        while t[i] != d[left]:
            left+=1
            if left >= n:
                ans='NO'
                break
        left+=1
        if left>=n:
            ans = 'NO'
            break
print(ans)

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
D = list(map(int, input().split()))
m = int(input())
T = list(map(int, input().split()))

for t in T:
    if t not in D:
        print("N0")
        exit()
    else:
        D.remove(t)
print("YES")


Failing test case input:
1
18
10
100 000 100 100 100

Expected output:
NO


Actual output:
N0


Fixed submission (verdict: Accepted):
from collections import Counter

n = int(input())
D = list(map(int, input().split()))
m = int(input())
T = list(map(int, input().split()))

Count = Counter(D)

for t in T:
    if not Count[t]:
        print("NO")
        exit()
    else:
        Count[t] -= 1
print("YES")

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("No")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[i]:
        continue
    else:
        print("NO")
        exit()

print("YES")

Failing test case input:
1
9
4
010 000 111 011 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("NO")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[i]:
        continue
    else:
        print("NO")
        exit()

print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))
di = defaultdict(lambda: 0)

for i in d:
    di[i] += 1
      
ans = "Yes" 
      
for i in t:
    if not di[i] or (di[i] == 0):
        ans = "No"
        break
    else:
        di[i] -= 1
         
print(ans)

Failing test case input:
7
000 200 531 700 238 3462 2000
8
100 200 500 337 499 2833

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
d = input().split()
m = int(input())
t = input().split()
 
dic = dict()
 
for di in d:
    if di in dic:
        dic[di] += 1
    else:
        dic[di] = 1
 
ans = "YES"
for ti in t:
    if ti not in dic or dic[ti] == 0:
        ans = "NO"
        break
    else:
        dic[ti] -= 1
 
print(ans)

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
*D, = map(int, input().split())
m = int(input())
*T, = map(int, input().split())
D = set(D)
T = set(T)
if all([t in D for t in T]):
    print('YES')
else:
    print('NO')


Failing test case input:
15
1 4 2 3 4 3 4 7 8 6 8 2 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
*D, = map(int, input().split())
m = int(input())
*T, = map(int, input().split())
D.sort()
T.sort()
j = 0
for i in range(n):
    if j == m:
        break
    if D[i] == T[j]:
        j += 1
if j == m:
    print('YES')
else:
    print('NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
dd,tt=collections.Counter(d),collections.Counter(t)
for k,v in tt.items():
  if dd.get(k)==None:
    print("NO")
    exit()
  elif dd.get(k)>=v:
    print("NO")
    exit()
print("YES")

Failing test case input:
15
1 4 2 3 3 3 1 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
import collections
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
dd,tt=collections.Counter(d),collections.Counter(t)
for k,v in tt.items():
  if dd.get(k)==None:
    print("NO")
    exit()
  elif dd.get(k)<v:
    print("NO")
    exit()
print("YES")
Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    d = list(map(int, input().split()))
    m = int(input())
    t = list(map(int, input().split()))
    t = collections.Counter(t)
    for i in t:
        if t[i] > d.count(i):
            print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Failing test case input:
7
010 104 531 700 89 6869 2004
4
000 125 1240 103 507 331

Expected output:
NO


Actual output:
YES
YES
YES
YES
YES
YES
NO


Fixed submission (verdict: Accepted):
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    d = list(map(int, input().split()))
    m = int(input())
    t = list(map(int, input().split()))
    t = collections.Counter(t)
    d = collections.Counter(d)
    for i in t:
        if t[i] > d[i]:
            print("NO")
            break
    else:
        print("YES")
    return 0

if __name__ == "__main__":
    solve()

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

c1 = Counter(D)
c2 = Counter(T)

for t in c2.keys():
    if c2[t] > c1[t]:
        print("No")
        exit()
print("Yes")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 2 7
9
7 4 1 4 1 2 3 8 5

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

c1 = Counter(D)
c2 = Counter(T)

for t in c2.keys():
    if c2[t] > c1[t]:
        print("NO")
        exit()
print("YES")

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter
n = int(input())
d = dict(Counter(list(map(int,input().split()))))
m = int(input())
t = list(map(int,input().split()))
check = True
for i in t:
  if i in d.keys():
    if d[i] > 0:
      d[i] -= 1
    else:
      check = False
      break
  else:
    check = False
    break
print("Yes" if check else "No")

Failing test case input:
1
35
7
010 100 110 110 101

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
d = dict(Counter(list(map(int,input().split()))))
m = int(input())
t = list(map(int,input().split()))
check = True
for i in t:
  if i in d.keys():
    if d[i] > 0:
      d[i] -= 1
    else:
      check = False
      break
  else:
    check = False
    break
print("YES" if check else "NO")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
D=[int(i) for i in input().split()]
M=int(input())
T=[int(i) for i in input().split()]

D.sort()
T.sort()

indexD=0
indexT=0
while indexD<len(D) and indexT<len(T):
	if D[indexD]==T[indexT]:
		indexD+=1
		indexT+=1
	else:
		indexD+=1
if indexT==len(T):
	print("Yes")
else:
	print("No")

Failing test case input:
1
35
9
000 100 100 100 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
D=[int(i) for i in input().split()]
M=int(input())
T=[int(i) for i in input().split()]

D.sort()
T.sort()

indexD=0
indexT=0
while indexD<len(D) and indexT<len(T):
	if D[indexD]==T[indexT]:
		indexD+=1
		indexT+=1
	else:
		indexD+=1
if indexT==len(T):
	print("YES")
else:
	print("NO")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
n = int(input())
d_ = [int(i) for i in input().split()]
m = int(input())
t_ = [int(i) for i in input().split()]
d = collections.Counter(d_)
t = collections.Counter(t_)
for ti in t:
    if d[ti] == 0:
        print("NO")
        exit()
    else:
        d[ti] -= 1
print("YES")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d_ = [int(i) for i in input().split()]
m = int(input())
t_ = [int(i) for i in input().split()]
d = collections.Counter(d_)
t = collections.Counter(t_)
for ti in t_:
    if d[ti] == 0:
        print("NO")
        exit()
    else:
        d[ti] -= 1
print("YES")

Problem: p03578
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

from collections import Counter
cd = Counter(d)
ct = Counter(t)

for tt in ct.items():
    if tt[1] > cd[tt[0]]:
        print("No")
        break
else:
    print("Yes")


Failing test case input:
15
1 2 2 3 4 3 4 4 8 6 5 3 5 5 5
9
7 4 3 2 1 2 3 8 5

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

from collections import Counter
cd = Counter(d)
ct = Counter(t)

for tt in ct.items():
    if tt[1] > cd[tt[0]]:
        print("NO")
        break
else:
    print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

grA = dict(collections.Counter(d))
grB = dict(collections.Counter(t))


for numB,cntB in grB.items():
  
  try:
    if grA[numB] < cntB:
      print("No")    
      exit()
  except KeyError:
    print("No")    
    exit()
    
print("Yes")

Failing test case input:
7
100 200 500 700 238 1600 2000
6
100 200 500 337 1600 1600

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

grA = dict(collections.Counter(d))
grB = dict(collections.Counter(t))


for numB,cntB in grB.items():
  
  try:
    if grA[numB] < cntB:
      print("NO")    
      exit()
  except KeyError:
    print("NO")    
    exit()
    
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
from collections import Counter
input()
D = map(int, input().split())
input()
T = map(int, input().split())

CD = Counter(D)
CT = Counter(T)
for x in CD:
  c = CT.get(x)
  if not c is None and CD[x] <= c:
    pass
  else:
    break
else:
  print("YES")
  sys.exit()
print("NO")

    

Failing test case input:
15
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
9
5 4 3 2 1 2 3 4 5

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
import sys
from collections import Counter
input()
D = map(int, input().split())
input()
T = map(int, input().split())

CD = Counter(D)
CT = Counter(T)
for x in CT:
  c = CD.get(x)
  if not c is None and CT[x] <= c:
    pass
  else:
    break
else:
  print("YES")
  sys.exit()
print("NO")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
for i in t:
  if i in d:
    d.remove(i)
  else:
    print("NO")
print("YES")

Failing test case input:
1
9
2
010 000 111 111 101

Expected output:
NO


Actual output:
NO
NO
NO
NO
NO
YES


Fixed submission (verdict: Accepted):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
dict = {}
for i in d:
  if i in dict:
    dict[i] += 1
  else:
    dict[i] = 1
for i in t:
  if dict.get(i, 0) > 0:
    dict[i] -= 1
  else:
    print("NO")
    exit()
print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = sorted(list(map(int,input().split())))
M = int(input())
T = sorted(list(map(int,input().split())))
for x in T[::-1]:
    while len(D):
        temp = D.pop()
        if temp==x:
            break
    if len(D)==0:
        print('NO')
        break 
else:
    print('YES')

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
import collections
N = int(input())
D = collections.Counter(list(map(int,input().split())))
M = int(input())
T = collections.Counter(list(map(int,input().split())))
for x in T:
    if D[x]<T[x]:
        print('NO')
        break
else:
    print('YES')

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
 
n = int(input())
d = sorted(list(map(int,input().split())))
m = int(input())
t = list(map(int,input().split()))

cd = collections.Counter(d)
ct = collections.Counter(t)

flg = True
for k in ct.items():
  if k[1] >= cd[k[0]]:
    flg = False

print('YES' if flg else 'NO')

Failing test case input:
15
1 4 2 3 3 3 1 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
import collections
 
n = int(input())
d = sorted(list(map(int,input().split())))
m = int(input())
t = list(map(int,input().split()))

cd = collections.Counter(d)
ct = collections.Counter(t)

flg = True
for k in ct.items():
  if k[1] > cd[k[0]]:
    flg = False

print('YES' if flg else 'NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

if __name__ == '__main__':
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    counter_d = Counter(D)
    counter_t = Counter(T)

    ans = "Yes"
    for point, num in counter_t.items():

        if counter_d.get(point) is None or counter_d.get(point) < num:
            ans = "No"
            break

    print(ans)


Failing test case input:
15
2 4 2 3 3 4 1 7 8 8 8 2 0 3 7
9
7 5 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter

if __name__ == '__main__':
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    counter_d = Counter(D)
    counter_t = Counter(T)

    ans = "YES"
    for point, num in counter_t.items():
        if counter_d.get(point) is None or counter_d.get(point) < num:
            ans = "NO"
            break

    print(ans)
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))

from collections import Counter

a=Counter(D)
b=Counter(T)

for keys in b:
  if keys not in a:
    print("No")
    break
  else:
    if b[keys]>a[keys]:
      print("No")
      break
else:
  print("Yes")

Failing test case input:
15
1 4 2 3 4 3 4 7 8 6 8 2 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))

from collections import Counter

a=Counter(D)
b=Counter(T)

for keys in b:
  if keys not in a:
    print("NO")
    break
  else:
    if b[keys]>a[keys]:
      print("NO")
      break
else:
  print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
import math
from collections import Counter


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
D = inintl()
m = inint()
T = inintl()

D = Counter(D)

for t in T:
    D[t] -= 1

for i in D:
    if D[i] < 0:
        print("No")
        exit()

print("Yes")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 4 1 2 3 8 5

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
import math
from collections import Counter


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
D = inintl()
m = inint()
T = inintl()

D = Counter(D)

for t in T:
    D[t] -= 1

for i in D:
    if D[i] < 0:
        print("NO")
        exit()

print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
flag = False
ans_flag = True

for i in T:
    
    for n, j in enumerate(D):
        if i == j:
            D.pop(n)
            
            flag = True
            break
    if flag == False:
        print("No")
        ans_flag = False
        break
    else:
        flag = False
if ans_flag == True:
    print("Yes")


Failing test case input:
1
35
7
000 100 010 100 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
flag = False
ans_flag = True
d = collections.Counter(D)
t = collections.Counter(T)


for i in t:
    i_str = str(i)
    d_count = d[i]
    if d_count < t[i]:
        print("NO")
        ans_flag = False
        break

if ans_flag == True:
    print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
Flg = "YES"

c1 = Counter(D)
c2 = Counter(T)

for i, val in c2.items():
    if(c1[i] < val):
        Flg = "No"
        break
print(Flg)

Failing test case input:
1
13
5
100 100 100 100 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
Flg = "YES"

c1 = Counter(D)
c2 = Counter(T)

for i, val in c2.items():
    if(c1[i] < val):
        Flg = "NO"
        break
print(Flg)

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
d.sort()
t.sort()
i,j=0,0
while i<m:
  if t[i]<d[j]:
    print("NO")
    exit()
  elif t[i]==d[j]:
    i+=1
    j+=1
  else:
    j+=1
  if j==n:
    print("NO")
    exit()
print("YES")

Failing test case input:
15
1 2 2 3 4 3 4 4 8 6 5 3 5 5 7
9
7 4 3 2 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
d.sort()
t.sort()
i,j=0,0
while i<m:
  if t[i]<d[j]:
    print("NO")
    exit()
  elif t[i]==d[j]:
    i+=1
    j+=1
  else:
    j+=1
  if j==n and i<m:
    print("NO")
    exit()
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
Ds = list(map(int,input().split()))
M = int(input())
Ts = list(map(int,input().split()))

sDs = [-1]+sorted(Ds)
sTs = sorted(Ts)

print(sDs)
print(sTs)

ind = 0
for t in sTs:
    flg = False
    for j in range(ind+1,len(sDs)):
        if sDs[j] == t:
            ind = j
            flg = True
            break
    if not flg:
        print("NO")
        break
if flg:
    print("YES")
        

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 4 1 2 3 8 5

Expected output:
YES


Actual output:
[-1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 6, 7, 7, 8, 8]
[1, 1, 2, 3, 4, 4, 5, 7, 8]
YES


Fixed submission (verdict: Accepted):
N = int(input())
Ds = list(map(int,input().split()))
M = int(input())
Ts = list(map(int,input().split()))

sDs = [-1]+sorted(Ds)
sTs = sorted(Ts)

ind = 0
for t in sTs:
    flg = False
    for j in range(ind+1,len(sDs)):
        if sDs[j] == t:
            ind = j
            flg = True
            break
    if not flg:
        print("NO")
        break
if flg:
    print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
N = int(input())
D = collections.Counter(list(map(int,input().split())))
M = int(input())
T = collections.Counter(list(map(int,input().split())))
for x in T:
    if D[x]<T[x]:
        print('NO')
        break
else:
    print('Yes')

Failing test case input:
5
3 1 4 1 5
3
5 4 3

Expected output:
YES

Actual output:
Yes


Fixed submission (verdict: Accepted):
import collections
N = int(input())
D = collections.Counter(list(map(int,input().split())))
M = int(input())
T = collections.Counter(list(map(int,input().split())))
for x in T:
    if D[x]<T[x]:
        print('NO')
        break
else:
    print('YES')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))
D.sort()
def find(a, i):
    l = 0
    r = len(a)-1
    mid = (l+r)
    while l <= r:
        if i == a[mid]:
            return mid
        elif i < a[mid]:
            r = mid - 1
        else:
            l = mid + 1
        mid = (l+r)
    return -1

for i in range(M):
    j = find(D, T[i])
    if j == -1:
        print("NO")
        exit(0)
    
print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
from collections import defaultdict
N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))
dic = defaultdict(int)
for d in D:
    dic[d] += 1
def find(a, i):
    l = 0
    r = len(a)-1
    mid = (l+r)
    while l <= r:
        if i == a[mid]:
            return mid
        elif i < a[mid]:
            r = mid - 1
        else:
            l = mid + 1
        mid = (l+r)
    return -1
keys = list(dic.keys())
keys.sort()
for i in range(M):
    j = find(keys, T[i])
    if j == -1 or dic[keys[j]] == 0:
        print("NO")
        exit(0)
    dic[keys[j]] -= 1
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N = int(input())
D = input().split(" ")
M = int(input())
T = input().split(" ")

D.sort()
T.sort()
j = 0

for i in T:
	if D[j] == i :
		continue
	else:
		j += 1

		if j > N - 1:
			print("NO")
			exit(0)

		elif D[j] > i:
			print("NO")
			exit(0)

print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):



N = int(input())
D = input().split(" ")
M = int(input())
T = input().split(" ")


if len(D) < len(T):
	print("NO")
	exit(0)

D.sort()
T.sort()

i = 0
j = 0

while True:
	if i > M-1:
		print("YES")
		break

	elif D[j] == T[i] :
		i += 1
		j += 1

	else:
		j += 1

		if j > N - 1:
			print("NO")
			break

		elif D[j] > T[i]:
			print("NO")
			break
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

searched = []
if N < M:
    print('NO')
else:
    flag = True
    for i in range(M):
        if T[i] in searched:
            if D.count(T[i]) < T.count(T[i]):
                flag = False
                break
        searched.append(T[i])
    if flag:
        print('YES')
    else:
        print('NO')

Failing test case input:
15
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
9
7 4 3 2 1 2 3 4 5

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))


def countNumber(LIST):
    cnt = {}
    for l in LIST:
        try:
            cnt[l] += 1
        except KeyError:
            cnt[l] = 1
    return cnt


countD = countNumber(D)
countT = countNumber(T)

flag = True
for i in countT.keys():
    try:
        if countD[i] < countT[i]:
            flag = False
    except KeyError:
        flag = False
        break

if flag:
    print('YES')
else:
    print('NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
dd = Counter(d)
tt = Counter(t)
print(dd, tt)
ok = True
for i, j in tt.items():
    if i in dd:
        
        if dd[i] < j:
            ok = False
    else:
        ok = False
    

if ok:
    print('YES')
else:
    print('NO')

Failing test case input:
15
1 2 2 3 4 3 4 4 4 6 5 3 5 5 5
9
7 4 3 2 1 2 3 4 5

Expected output:
NO


Actual output:
Counter({4: 4, 5: 4, 3: 3, 2: 2, 1: 1, 6: 1}) Counter({4: 2, 3: 2, 2: 2, 7: 1, 1: 1, 5: 1})
NO


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
dd = Counter(d)
tt = Counter(t)

ok = True
for i, j in tt.items():
    if i in dd:
        
        if dd[i] < j:
            ok = False
    else:
        ok = False
    

if ok:
    print('YES')
else:
    print('NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
d.sort()
t.sort()
for i in range(len(d)-len(t)+1):
    if t==d[i:i+len(t)+1]:
        print("YES")
        exit()

print("NO")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 3 2 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
cd=Counter(d)
ct=Counter(t)

for k,v in ct.items():
    if cd[k]<v:
        print("NO")
        exit()
print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))

D = sorted(D)
T = sorted(T)


if T[0] in D:
    first = D.index(T[0])
    if T == D[first:M+first]:
         res = 'YES'
    else:
        res = 'NO'
else:
    res = 'NO'

print(res)

Failing test case input:
15
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
9
5 4 3 2 1 2 3 4 5

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter

N = int(input())
D = list(map(int,input().split()))
M = int(input())
T = list(map(int,input().split()))

res = 'YES'
counter_d = Counter(D)
counter_t = Counter(T)

set_t = list(set(T))
for i in set_t:
    if counter_d[i] < counter_t[i]:
        res = 'NO'
        break

print(res)

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N=int(input())
d=list(map(int,input().split()))
D=Counter(d)
M=int(input())
t=list(map(int,input().split()))
T=Counter(t)
for key,value in T.items():
    if D[key]<value:
        print("No")
        exit()
else:
    print("Yes")


Failing test case input:
1
13
5
100 100 100 100 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
 
n = int(input())
ln = list(map(int, input().split()))
m = int(input())
lm = list(map(int, input().split()))
 
c1 = collections.Counter(lm)
c2 = collections.Counter(ln)
 
for i in c1.keys():
    if c2[i] < c1[i]:
        print("NO")
        exit()
 
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
d=dict()
for a in map(int,input().split()):
  if a not in d:
    d[a]=1
  else:
    d[a]+=1
m=int(input())
t=dict()
for a in map(int,input().split()):
  if a not in t:
    t[a]=1
  else:
    t[a]+=1
  if a not in d:
    d[a]=0
ans="YES"
for i in t.keys():
  if not t[i]==d[i]:
    ans="NO"
print(ans)

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 2 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n=int(input())
d=dict()
for a in map(int,input().split()):
  if a not in d:
    d[a]=1
  else:
    d[a]+=1
m=int(input())
t=dict()
for a in map(int,input().split()):
  if a not in t:
    t[a]=1
  else:
    t[a]+=1
  if a not in d:
    d[a]=0
ans="YES"
for i in t.keys():
  if not t[i]<=d[i]:
    ans="NO"
print(ans)
Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

count_d = Counter(d)
count_t = Counter(t)

for i in count_t.items():
  if i[0] not in count_d:
    print("NO")
    exit()
  if i[0] in count_d: count_d[i[0]] -= i[1]
else:
  for x in count_d.values():
    if x < 0:
      print("NO")
      exit()
  print("Yes")

Failing test case input:
5
3 1 4 1 5
3
5 4 3

Expected output:
YES

Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

count_d = Counter(d)
count_t = Counter(t)

for i in count_t.items():
  if i[0] not in count_d:
    print("NO")
    exit()
  if i[0] in count_d: count_d[i[0]] -= i[1]
else:
  for x in count_d.values():
    if x < 0:
      print("NO")
      exit()
  print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter as c
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
flag = True
d_c = c(d)
t_c = c(t)
if n<m: flag = False
else: 
    for i,j in t_c.items():
        if d_c[i] < j:
            flag = False
            break
print('Yes' if flag else 'No')


Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 2 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter as c
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))
flag = True
d_c = c(d)
t_c = c(t)
if n<m: flag = False
else: 
    for i,j in t_c.items():
        if d_c[i] < j:
            flag = False
            break
print('YES' if flag else 'NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = {}
for i in input().split():
    if i in d:
        d[i] += 1
    else:
        d[i] = 1

m = int(input())
for i in input().split():
    if i in d and d[i] > 0:
        d[i] -= 1
    else:
        print("No")
        exit()
print("Yes")

Failing test case input:
15
2 0 2 3 3 4 1 7 8 11 8 2 0 3 7
9
7 5 1 4 2 2 0 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
n = int(input())
d = {}
for i in input().split():
    if i in d:
        d[i] += 1
    else:
        d[i] = 1

m = int(input())
for i in input().split():
    if i in d and d[i] > 0:
        d[i] -= 1
    else:
        print("NO")
        sys.exit()
print("YES")