Buggy python submission (verdict: Runtime Error):
import copy

n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Fixed submission:
import copy

n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Fixed submission:
import copy

n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Fixed submission:
import copy

n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i range (m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)

Fixed submission:
import copy

n, m = map(int, input().split())
h = list(map(int, input().split()))
l = []
for i in range(m):
    a, b = map(int, input().split())
    l.append([a, b])

ll = [0]*n

for j in l:
    if h[j[0] - 1] > h[j[1] - 1]:
        ll[j[1] - 1] += 1
    elif h[j[0] - 1] == h[j[1] - 1]:
        ll[j[1] - 1] += 1
        ll[j[0] - 1] += 1
    else:
        ll[j[0] - 1] += 1

ans = 0

for k in ll:
    if k == 0:
        ans += 1
    else:
        ans += 0
    
print(ans)