Problem p03578 (python)

Fixed submission:

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

dic = {}

for k in x :
    if k in dic.keys() :
        dic[k] += 1
    else :
        dic[k] = 1
    
for i in y :
    if i in dic.keys() :
        dic[i] -= 1
        if dic[i] == -1 :
            print('NO')
            exit()
    else :
        print('NO')
        exit()
print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)
z=[0]*MAX

print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)
z=[0]*1000000000

print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

z=[0]*MAX

print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

z=[0]*int(MAX)

print('YES')

Buggy submission (verdict: Runtime Error):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

z=[0]*(int(MAX)+1)

print('YES')

Buggy submission (verdict: Runtime Error):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

z=[0]*(MAX+1)

print('YES')

Buggy submission (verdict: Runtime Error):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

z=[0]*(MAX+1)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*(MAX+1)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*(MAX+1)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*(MAX+1)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k-1] += 1
    
for i in y :
    z[i-1] -= 1
    if z[i-1] == -1 :
        print('NO')
        exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k-1] += 1
    
for i in y :
    z[i-1] -= 1
    if z[i-1] == -1 :
        print('NO')
        sys.exit()
        
print('YES')

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k-1] += 1
    
j=0
for i in y :
    z[i-1] -= 1
    if z[i-1] == -1 :
        print('NO')
        j=1
        break
if j==0:
    print('YES')

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k-1] += 1
    
for i in y :
    z[i-1] -= 1
    if z[i-1] == -1 :
        print('NO')
        sys.exit()
print('YES')

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        sys.exit()
print('YES')

Buggy submission (verdict: Runtime Error):
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

z=[0]*max(x)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        sys.exit()
print('YES')

Buggy submission (verdict: Runtime Error):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]
x=x.sort()
y=y.sort()

for k in range(len(y)) :
    for i in range(len(x)) :
        if x[i] == y[k] :
            del x[i]
            break
        if i+1 == len(x) :
            print('NO')
            j=1
if j == 0 :
    print('OK')

Buggy submission (verdict: Runtime Error):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]
x=x.sort()
y=y.sort()

for k in range(len(y)) :
    for i in range(len(x)) :
        if x[i] == y[k] :
            del x[i]
            break
        if i+1 == len(x) :
            print('NO')
            j=1
if j==0 :
    print('OK')