Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02689
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(N)) for i in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: A[b-1] = 0 elif H[a-1] < H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(1,N+1)) for i in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: A[b-1] = 0 elif H[a-1] < H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
[ "call.arguments.add" ]
422,111
422,112
u592601397
python
p02689
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(N)) for i in range(M): a, b = map(int, input().split()) if H[a-1]>H[b-1]: A[b-1] = 0 elif H[a-1]<H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(1,N+1)) for i in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: A[b-1] = 0 elif H[a-1] < H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
[ "call.arguments.add" ]
422,114
422,112
u592601397
python
p02689
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(M)) for i in range(M): a, b = map(int, input().split()) if H[a-1]>H[b-1]: A[b-1] = 0 elif H[a-1]<H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
#ABC166 N,M=map(int,input().split()) H =list(map(int,input().split())) #展望台の標高 A = list(range(1,N+1)) for i in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: A[b-1] = 0 elif H[a-1] < H[b-1]: A[a-1] = 0 else: A[a-1] = 0 A[b-1] = 0 print(N-A.count(0))
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
422,115
422,112
u592601397
python
p02689
n,m=map(int, input().split()) h=list(map(int, input().split())) near=[[i] for i in h] for i in range(m): a,b=map(int, input().split()) near[a-1].append(h[b-1]) near[b-1].append(h[a-1]) cnt=0 for i in range(n): if max(near[i])<=h[i]: cnt+=1 print(cnt)
n,m=map(int, input().split()) h=list(map(int, input().split())) near=[[0] for i in h] for i in range(m): a,b=map(int, input().split()) near[a-1].append(h[b-1]) near[b-1].append(h[a-1]) cnt=0 for i in range(n): if max(near[i])<h[i]: cnt+=1 print(cnt)
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,118
422,119
u910358825
python
p02689
n, m = map(int,input().split()) h = list(map(int,input().split())) ab = [list(map(int,input().split())) for _ in range(m)] point = [0]*n app = [0]*n cnt = [] for i in ab: app[i[0]-1] += 1 app[i[1]-1] += 1 if h[i[0]-1] > h[i[1]-1]: point[i[0]-1] += 1 elif h[i[0]-1] < h[i[1]-1]: point[...
n, m = map(int,input().split()) h = list(map(int,input().split())) ab = [list(map(int,input().split())) for _ in range(m)] point = [0]*n app = [0]*n cnt = [] for i in ab: app[i[0]-1] += 1 app[i[1]-1] += 1 if h[i[0]-1] > h[i[1]-1]: point[i[0]-1] += 1 elif h[i[0]-1] < h[i[1]-1]: point[...
[ "call.arguments.add", "call.arguments.change" ]
422,144
422,145
u607563136
python
p02689
#!/usr/bin/env python # -*- coding: utf-8 -*- # # FileName: C_fix_2 # CreatedDate: 2020-08-08 01:59:29 +0900 # LastModified: 2020-08-08 02:09:05 +0900 # import os import sys # import numpy as np # import pandas as pd def main(): n, m = map(int, input().split()) h = [0] + list(map(int, input().split())) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # FileName: C_fix_2 # CreatedDate: 2020-08-08 01:59:29 +0900 # LastModified: 2020-08-08 02:11:36 +0900 # import os import sys # import numpy as np # import pandas as pd def main(): n, m = map(int, input().split()) h = [0] + list(map(int, input().split())) ...
[]
422,148
422,149
u326552320
python
p02689
n,m=map(int,input().split()) height=list(map(int,input().split())) hoge=[1 for i in range(n)] for i in range(m): a,b=map(int,input().split()) if(height[a-1]>height[b-1]): hoge[a-1]=0 elif(height[a-1]<height[b-1]): hoge[b-1]=0 else: hoge[a-1],hoge[a-1]=0,0 print(sum(hoge))
n,m=map(int,input().split()) height=list(map(int,input().split())) hoge=[1 for i in range(n)] #print(hoge) for i in range(m): a,b=map(int,input().split()) #print(a,b,height[a-1],height[b-1]) if(height[a-1]>height[b-1]): hoge[b-1]=0 elif(height[a-1]<height[b-1]): hoge[a-1]=0 else: hoge[a-1],hoge[b...
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,150
422,151
u777028980
python
p02689
n,m=map(int,input().split()) height=list(map(int,input().split())) hoge=[1 for i in range(n)] for i in range(m): a,b=map(int,input().split()) if(height[a-1]>height[b-1]): hoge[a-1]=0 elif(height[a-1]<height[b-1]): hoge[b-1]=0 else: hoge[a-1],hoge[a-1]=0,0 print(sum(hoge))
n,m=map(int,input().split()) height=list(map(int,input().split())) hoge=[1 for i in range(n)] #print(hoge) for i in range(m): a,b=map(int,input().split()) #print(a,b,height[a-1],height[b-1]) if(height[a-1]>height[b-1]): hoge[b-1]=0 elif(height[a-1]<height[b-1]): hoge[a-1]=0 else: hoge[a-1],hoge[b...
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,152
422,151
u777028980
python
p02689
N, M = map(int, input().split()) H = list(map(int, input().split())) X = [list(map(int, input().split())) for _ in range(M)] graph = [[] for _ in range(N)] for a, b in X: graph[a - 1].append(b - 1) graph[b - 1].append(a - 1) ans = [True] * N for u in range(N): for v in graph[u]: ans[u] &= H[u] > H...
N, M = map(int, input().split()) H = list(map(int, input().split())) X = [list(map(int, input().split())) for _ in range(M)] graph = [[] for _ in range(N)] for a, b in X: graph[a - 1].append(b - 1) graph[b - 1].append(a - 1) ans = [True] * N for u in range(N): for v in graph[u]: ans[u] &= H[u] > H...
[]
422,155
422,156
u057109575
python
p02689
n,m = map(int,input().split()) H = list(map(int,input().split())) a = [list(map(int,input().split())) for _ in range(m)] flag = [0]*n for i in range(m): if H[a[i][0]-1] > H[a[i][1]-1]: flag[a[i][0]-1] = 2 #flag[a[i][1]-1] = elif H[a[i][0]-1] == H[a[i][1]-1]: flag[a[i][0]-1] = 2 flag[a[i][1]-1] = 2 ...
n,m = map(int,input().split()) H = list(map(int,input().split())) a = [list(map(int,input().split())) for _ in range(m)] flag = [0]*n for i in range(m): if H[a[i][0]-1] > H[a[i][1]-1]: flag[a[i][1]-1] = 2 elif H[a[i][0]-1] == H[a[i][1]-1]: flag[a[i][0]-1] = 2 flag[a[i][1]-1] = 2 else: flag[a[i][0]...
[ "literal.number.integer.change", "assignment.variable.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,166
422,167
u626228246
python
p02689
N,M=map(int,input().split()) high=list(map(int,input().split())) A=[0]*N for i in range(M): a,b=map(int,input().split()) A[a-1]=max(A[a-1],H[b-1]) A[b-1]=max(A[b-1],H[a-1]) res=sum([H[i]>A[i] for i in range(N)]) print(res)
N,M=map(int,input().split()) H=list(map(int,input().split())) A=[0]*N for i in range(M): a,b=map(int,input().split()) A[a-1]=max(A[a-1],H[b-1]) A[b-1]=max(A[b-1],H[a-1]) res=sum([H[i]>A[i] for i in range(N)]) print(res)
[ "assignment.variable.change", "identifier.change" ]
422,174
422,175
u438189153
python
p02689
N,M=map(int,input().split()) high=list(map(int,input().split())) A=[0]*N for i in range(M): a,b=map(int,input().split()) A[a-1]=max(A[a-1],H[b-1]) A[b-1]=max(A[b-1],H[a-1]) res=sum(H[i]>A[i] for i in range(N)) print(res)
N,M=map(int,input().split()) H=list(map(int,input().split())) A=[0]*N for i in range(M): a,b=map(int,input().split()) A[a-1]=max(A[a-1],H[b-1]) A[b-1]=max(A[b-1],H[a-1]) res=sum([H[i]>A[i] for i in range(N)]) print(res)
[ "assignment.variable.change", "identifier.change", "call.arguments.change" ]
422,176
422,175
u438189153
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [1 for i in range(n)] for i in range(m): a, b = map(int, input().split()) a -= 1 b -= 1 if h[a] >= h[b]: ans[b] = 0 elif h[b] >= h[a]: ans[a] = 0 print (sum(ans))
n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [1 for i in range(n)] for i in range(m): a, b = map(int, input().split()) a -= 1 b -= 1 if h[a] >= h[b]: ans[b] = 0 if h[b] >= h[a]: ans[a] = 0 print (sum(ans))
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,177
422,178
u790476785
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) l = [1] * n for i in range(m): a, b = map(int, input().split()) if h[a - 1] <= h[b - 1]: l[a - 1] = 0 elif h[b - 1] <= h[a - 1]: l[b - 1] = 0 print(sum(l))
n, m = map(int, input().split()) h = list(map(int, input().split())) l = [1] * n for i in range(m): a, b = map(int, input().split()) if h[a - 1] <= h[b - 1]: l[a - 1] = 0 if h[b - 1] <= h[a - 1]: l[b - 1] = 0 print(sum(l))
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,181
422,182
u581403769
python
p02689
import sys import time import math import itertools as it def inpl(): return list(map(int, input().split())) st = time.perf_counter() # ------------------------------ N, M = inpl() H = inpl() dp = [True] * M for _ in range(M): A, B = inpl() if H[A-1] > H[B-1]: dp[B-1] = False elif H[A-1] < H[B-...
import sys import time import math import itertools as it def inpl(): return list(map(int, input().split())) st = time.perf_counter() # ------------------------------ N, M = inpl() H = inpl() dp = [True] * N for _ in range(M): A, B = inpl() if H[A-1] > H[B-1]: dp[B-1] = False elif H[A-1] < H[B-...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "control_flow.loop.for.condition.change" ]
422,183
422,184
u242580186
python
p02689
N, M = map(int, input().split()) H = list(map(int, input().split())) AB = [list(map(int, input().split())) for i in range(M)] tf_array = [0]*N for a, b in AB: print(a,b) if H[a-1] > H[b-1]: tf_array[b-1] += 1 elif H[a-1] == H[b-1]: tf_array[a-1] += 1 tf_array[b-1] += 1 else: ...
N, M = map(int, input().split()) H = list(map(int, input().split())) AB = [list(map(int, input().split())) for i in range(M)] tf_array = [0]*N for a, b in AB: if H[a-1] > H[b-1]: tf_array[b-1] += 1 elif H[a-1] == H[b-1]: tf_array[a-1] += 1 tf_array[b-1] += 1 else: tf_array[...
[ "call.remove" ]
422,193
422,194
u161164709
python
p02689
N, M = map(int, input().split()) #数字 H = list(map(int, input().split()))#リスト A = [list(map(int, input().split())) for i in range(M)] #数字、複数行複数列 good = [True]*N for i, j in A: print(i,j) i -= 1 j -= 1 if H[i] < H[j]: good[i] = False if H[i] > H[j]: good[j] = False if H[i] == H[...
N, M = map(int, input().split()) #数字 H = list(map(int, input().split()))#リスト A = [list(map(int, input().split())) for i in range(M)] #数字、複数行複数列 good = [True]*N for i, j in A: i -= 1 j -= 1 if H[i] < H[j]: good[i] = False if H[i] > H[j]: good[j] = False if H[i] == H[j]: goo...
[ "call.remove" ]
422,195
422,196
u620238824
python
p02689
def solve(): n, m = map(int, input().split()) h = list(map(int, input().split())) tenbo = [] bit = [0]*n for i in range(m): tenbo.append(list(map(int, input().split()))) hoge = [[] for i in range(n)] for i in range(m): hoge[tenbo[i][0]-1].append(tenbo[i][1]-1) hoge[tenbo[i][1]-1].append(tenbo[...
def solve(): n, m = map(int, input().split()) h = list(map(int, input().split())) tenbo = [] ans = 0 bit = [0]*n for i in range(m): tenbo.append(list(map(int, input().split()))) hoge = [[] for i in range(n)] for i in range(m): hoge[tenbo[i][0]-1].append(tenbo[i][1]-1) hoge[tenbo[i][1]-1].app...
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
422,207
422,208
u075304271
python
p02689
n,m = map(int,input().split()) h = list(map(int,input().split())) ma = [0]*(n) for i in range(n): a,b = map(lambda x: int(x)-1,input().split()) ma[a] = max(ma[a], h[b]) ma[b] = max(h[a], ma[b]) ans = 0 for i in range(n): if h[i]>ma[i]: ans+=1 print(ans)
n,m = map(int,input().split()) h = list(map(int,input().split())) ma = [0]*(n) for i in range(m): a,b = map(lambda x: int(x)-1,input().split()) ma[a] = max(ma[a], h[b]) ma[b] = max(h[a], ma[b]) ans = 0 for i in range(n): if h[i]>ma[i]: ans+=1 print(ans)
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,218
422,219
u266014018
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False elif h[A[i] - 1] < h[B[i] - 1]: p[A[i...
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False elif h[A[i] - 1] < h[B[i] - 1]: p[A[i...
[ "call.remove" ]
422,226
422,227
u626891113
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False if h[A[i] - 1] < h[B[i] - 1]: p[A[i]]...
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False elif h[A[i] - 1] < h[B[i] - 1]: p[A[i...
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
422,228
422,227
u626891113
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False if h[A[i] - 1] < h[B[i] - 1]: p[A[i]]...
n, m = map(int, input().split()) h = list(map(int, input().split())) p = [False] + [True]*n A = [] B = [] for i in range(m): a, b = map(int,input().split()) A.append(a) B.append(b) for i in range(m): if h[A[i] - 1] > h[B[i] - 1]: p[B[i]] = False if h[A[i] - 1] < h[B[i] - 1]: p[A[i]]...
[ "call.remove" ]
422,229
422,230
u626891113
python
p02689
N, M = list(map(int, input().split())) H = list(map(int, input().split())) ans = [1]*N for i in range(M): A, B = list(map(int, input().split())) if H[A-1] > H[B-1]: ans[B-1] = 0 elif H[A-1] < H[B-1]: ans[A-1] = 0 else: H[A-1] = 0 H[B-1] = 0 print(sum(ans))
N, M = list(map(int, input().split())) H = list(map(int, input().split())) ans = [1] * N for i in range(M): A, B = list(map(int, input().split())) if H[A - 1] > H[B - 1]: ans[B - 1] = 0 elif H[A - 1] < H[B - 1]: ans[A - 1] = 0 else: ans[A - 1] = 0 ans[B - 1] = 0 print...
[ "assignment.variable.change", "identifier.change" ]
422,240
422,241
u042347918
python
p02689
n,m = map(int,input().split()) H = list(map(int,input().split())) l = [1] * n for i in range(n): A,B = map(int,input().split()) if H[A-1] > H[B-1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [1] * N for i in range(M): A, B = map(int, input().split()) if H[A - 1] > H[B - 1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,248
422,249
u773440446
python
p02689
n,m = map(int,input().split()) H = list(map(int,input().split())) l = [1] * N for i in range(n): A,B = map(int,input().split()) if H[A-1] > h[B-1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [1] * N for i in range(M): A, B = map(int, input().split()) if H[A - 1] > H[B - 1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
422,250
422,249
u773440446
python
p02689
n,m = map(int,input().split()) h = list(map(int,input().split())) l = [1] * N for i in range(M): A,B = map(int,input().split()) if h[A-1] > h[B-1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [1] * N for i in range(M): A, B = map(int, input().split()) if H[A - 1] > H[B - 1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change" ]
422,251
422,249
u773440446
python
p02689
n,m = map(int,input().split()) h = list(map(int,input().split())) l = [0] * N for i in range(M): A,B = map(int,input().split()) if h[A-1] > h[B-1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [1] * N for i in range(M): A, B = map(int, input().split()) if H[A - 1] > H[B - 1]: l[B - 1] = 0 elif H[A - 1] < H[B - 1]: l[A - 1] = 0 elif H[A - 1] == H[B - 1]: l[A - 1], l[B - 1] = 0, 0 print(l.count(1))
[ "assignment.variable.change", "identifier.change", "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
422,252
422,249
u773440446
python
p02689
N,M = map(int,input().split()) H = list(map(int,input().split())) max_height = [0]*N for i in range(M): a,b = map(int,input().split()) max_height[a-1]=max(max_height[a-1],H[b-1]) max_height[b-1]=max(max_height[b-1],H[a-1]) print((sum(H[i] >= max_height[i] for i in range(N))))
N,M = map(int,input().split()) H = list(map(int,input().split())) max_height = [0]*N for i in range(M): a,b = map(int,input().split()) max_height[a-1]=max(max_height[a-1],H[b-1]) max_height[b-1]=max(max_height[b-1],H[a-1]) print((sum(H[i] > max_height[i] for i in range(N))))
[ "expression.operator.compare.change", "call.arguments.change", "io.output.change" ]
422,267
422,268
u912650255
python
p02689
n,k= map(int,input().split()) h=list(map(int,input().split())) x=[0]*n for i in range(k): a,b = map(int, input().split()) if h[a-1]>=h[b-1]: x[a-1]+=1 if h[b-1]>=h[a-1]: x[b-1]+=1 print(x.count(0))
n,k= map(int,input().split()) h=list(map(int,input().split())) x=[0]*n for i in range(k): a,b = map(int, input().split()) if h[a-1]>=h[b-1]: x[b-1] +=1 if h[b-1]>=h[a-1]: x[a-1] +=1 print(x.count(0))
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,269
422,270
u430726059
python
p02689
n,m=map(int,input().split()) H=list(map(int,input().split())) ans = [1]*n for i in range(m): a,b=map(int,input().split()) if H[a-1]>=H[b-1]: ans[b-1] *= 0 elif H[a-1]<=H[b-1]: ans[a-1] *= 0 print(sum(ans))
n,m=map(int,input().split()) H=list(map(int,input().split())) ans = [1]*n for i in range(m): a,b=map(int,input().split()) if H[a-1]>=H[b-1]: ans[b-1] = 0 if H[a-1]<=H[b-1]: ans[a-1] = 0 print(sum(ans))
[ "assignment.value.change", "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,279
422,280
u347397127
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(int, input().split())) for _ in range(m)] ans = [1]*n for i in range(m): if h[ab[i][0]-1] == h[ab[i][1]-1]: ans[ab[i][0]-1] = 0 ans[ab[i][1]-1] = 0 elif h[ab[i][0]-1] > h[ab[i][1]]: ans[ab[i][1]-1] = 0 ...
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(int, input().split())) for _ in range(m)] ans = [1]*n for i in range(m): if h[ab[i][0]-1] == h[ab[i][1]-1]: ans[ab[i][0]-1] = 0 ans[ab[i][1]-1] = 0 elif h[ab[i][0]-1] > h[ab[i][1]-1]: ans[ab[i][1]-1] = 0 ...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
422,285
422,286
u285265363
python
p02689
N, M = map(int, input().split()) H = list(map(int,input().split())) tmp = [0]*N for m in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: tmp[b-1] = 1 elif H[a-1] < H[b-1]: tmp[a-1] = 1 else: tmp[a-1] = 1 tmp[b-1] = 1 print(sum(tmp))
N, M = map(int, input().split()) H = list(map(int,input().split())) tmp = [1]*N for m in range(M): a, b = map(int, input().split()) if H[a-1] > H[b-1]: tmp[b-1] = 0 elif H[a-1] < H[b-1]: tmp[a-1] = 0 else: tmp[a-1] = 0 tmp[b-1] = 0 print(sum(tmp))
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
422,292
422,293
u971096161
python
p02689
from collections import deque n,m = map(int,input().split()) h=list(map(int,input().split())) g = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) a-=1 b-=1 g[a].append(b) g[b].append(a) ans=0 for j in range(n): for i in g[j]: if h[j]<=h[i]: break ...
from collections import deque n,m = map(int,input().split()) h=list(map(int,input().split())) g = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) a-=1 b-=1 g[a].append(b) g[b].append(a) ans=0 for j in range(n): for i in g[j]: if h[j]<=h[i]: break ...
[ "call.remove" ]
422,296
422,297
u433380437
python
p02689
n,m = map(int,input().split()) h = list(map(int,input().split())) g = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) g[a-1].append(b-1) g[b-1].append(a-1) print(g) cnt = n for i in range(n): for j in g[i]: if h[i] <= h[j]: cnt -= 1 break print(cnt)
n,m = map(int,input().split()) h = list(map(int,input().split())) g = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) g[a-1].append(b-1) g[b-1].append(a-1) cnt = n for i in range(n): for j in g[i]: if h[i] <= h[j]: cnt -= 1 break print(cnt)
[ "call.remove" ]
422,320
422,321
u570155187
python
p02689
N,M=map(int, input().split()) peaks=list(map(int, input().split())) flag=[1]*N a=0 b=0 for i in range(M): a,b=map(int,input().split()) a-=1 b-=1 if peaks[a]<=peaks[b]: flag[a]=0 if peaks[a]>=peaks[b]: flag[a]=0 ans=0 for i in flag: ans+=flag[i] print(ans)
N,M=map(int, input().split()) peaks=list(map(int, input().split())) flag=[1]*N a=0 b=0 for i in range(M): a,b=map(int,input().split()) a-=1 b-=1 if peaks[a]<=peaks[b]: flag[a]=0 if peaks[a]>=peaks[b]: flag[b]=0 ans=0 for i in flag: ans+=i print(ans)
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
422,343
422,344
u294700660
python
p02689
import sys import numpy as np from math import ceil as C, floor as F, sqrt from collections import defaultdict as D, Counter as CNT from functools import reduce as R ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' alp = 'abcdefghijklmnopqrstuvwxyz' def _X(): return sys.stdin.readline().rstrip().split(' ') def _S(ss): return tuple...
import sys import numpy as np from math import ceil as C, floor as F, sqrt from collections import defaultdict as D, Counter as CNT from functools import reduce as R ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' alp = 'abcdefghijklmnopqrstuvwxyz' def _X(): return sys.stdin.readline().rstrip().split(' ') def _S(ss): return tuple...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
422,355
422,356
u354862173
python
p02689
import sys import numpy as np from math import ceil as C, floor as F, sqrt from collections import defaultdict as D, Counter as CNT from functools import reduce as R ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' alp = 'abcdefghijklmnopqrstuvwxyz' def _X(): return sys.stdin.readline().rstrip().split(' ') def _S(ss): return tuple...
import sys import numpy as np from math import ceil as C, floor as F, sqrt from collections import defaultdict as D, Counter as CNT from functools import reduce as R ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' alp = 'abcdefghijklmnopqrstuvwxyz' def _X(): return sys.stdin.readline().rstrip().split(' ') def _S(ss): return tuple...
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
422,357
422,356
u354862173
python
p02689
n, m = map(int, input().split()) hs = list(map(int, input().split())) edge = [[] for _ in range(n)] for i in range(m): a, b = map(int, input().split()) a -= 1 b -= 1 edge[a].append(b) edge[b].append(a) print(edge) cnt = 0 for node in range(n): good = True for neighbor in edge[node]: ...
n, m = map(int, input().split()) hs = list(map(int, input().split())) edge = [[] for _ in range(n)] for i in range(m): a, b = map(int, input().split()) a -= 1 b -= 1 edge[a].append(b) edge[b].append(a) cnt = 0 for node in range(n): good = True for neighbor in edge[node]: if hs[n...
[ "call.remove" ]
422,368
422,369
u066551652
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[[] for nn in range(n)] for mm in range(m): a,b=map(int,input().split()) ab[a-1].append(b-1) ab[b-1].append(a-1) cnt=0 for i in range(n): hi=0 for ll in ab[i]: hi=max(hi,h[ll]) if hi>h[i]: cnt+=1 print(cnt)
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[[] for nn in range(n)] for mm in range(m): a,b=map(int,input().split()) ab[a-1].append(b-1) ab[b-1].append(a-1) cnt=0 for i in range(n): hi=0 for ll in ab[i]: hi=max(hi,h[ll]) if hi<h[i]: cnt+=1 print(cnt)
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,372
422,373
u932868243
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[list(map(int,input().split())) for _ in range(m)] list=[0]*n for a,b in ab: list[a-1]+=max(list[a-1],h[b-1]) list[b-1]+=max(list[b-1],h[a-1]) count=0 for i in range(n): if list[i]<h[i]: count+=1 print(count)
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[list(map(int,input().split())) for _ in range(m)] list=[0]*n for a,b in ab: list[a-1]=max(list[a-1],h[b-1]) list[b-1]=max(list[b-1],h[a-1]) count=0 for i in range(n): if list[i]<h[i]: count+=1 print(count)
[ "assignment.value.change" ]
422,374
422,375
u932868243
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[list(map(int,input().split())) for _ in range(m)] list=[0]*n for a,b in ab: list[a-1]+=max(list[a-1],h[b-1]) list[b-1]+=max(list[b-1],h[a-1]) ans=0 for i in range(n): if list[i]<h[i]: count+=1 print(count)
n,m=map(int,input().split()) h=list(map(int,input().split())) ab=[list(map(int,input().split())) for _ in range(m)] list=[0]*n for a,b in ab: list[a-1]=max(list[a-1],h[b-1]) list[b-1]=max(list[b-1],h[a-1]) count=0 for i in range(n): if list[i]<h[i]: count+=1 print(count)
[ "assignment.value.change", "assignment.variable.change", "identifier.change" ]
422,376
422,375
u932868243
python
p02689
n,m=map(int,input().split()) a=list(map(int,input().split())) c=0 deg=[[] for i in range(n)] for i in range(m): u,v=map(int,input().split()) deg[u-1].append(v-1) deg[v-1].append(u-1) for i in range(n): ff=0 for j in deg[i]: if(a[i]>a[deg[i][j]]): continue ff=1 if(ff==0): c+=1 print(c)
n,m=map(int,input().split()) a=list(map(int,input().split())) c=0 deg=[[] for i in range(n)] for i in range(m): u,v=map(int,input().split()) deg[u-1].append(v-1) deg[v-1].append(u-1) for i in range(n): ff=0 for j in deg[i]: if(a[i]>a[j]): continue ff=1 if(ff==0): c+=1 print(c)
[ "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change" ]
422,382
422,383
u719217609
python
p02689
n,m = map(int, input().split()) h_list = list(map(int, input().split())) #元リスト(変えない) newlist = list(h_list) #変換用リスト for i in range(m): a, b = map(int, input().split()) if h_list[a-1] < h_list[b-1]: newlist[a-1] = 0 elif h_list[a-1] > h_list[b-1]: newlistlist[b-1] = 0 else: newlis...
n,m = map(int, input().split()) h_list = list(map(int, input().split())) #元リスト(変えない) newlist = list(h_list) #変換用リスト for i in range(m): a, b = map(int, input().split()) if h_list[a-1] < h_list[b-1]: newlist[a-1] = 0 elif h_list[a-1] > h_list[b-1]: newlist[b-1] = 0 else: newlist[a-...
[ "assignment.variable.change", "identifier.change" ]
422,392
422,393
u078276601
python
p02689
#!/usr/bin/env python3 n, m = map(int, input().split()) h = [0]+list(map(int, input().split())) ans = [0]+[1]*n for i in range(m): a, b = map(int, input().split()) if h[a]>=h[b]: ans[b] = 0 elif h[b]>=h[a]: ans[a] = 0 print(sum(ans))
n, m = map(int, input().split()) h = [0]+list(map(int, input().split())) ans = [0]+[1]*n for i in range(m): a, b = map(int, input().split()) if h[a]>=h[b]: ans[b] = 0 if h[b]>=h[a]: ans[a] = 0 print(sum(ans))
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,433
422,434
u132892633
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(lambda x: x -1, map(int, input().split()))) for _ in range(m)] # 一つづつ展望台を見る必要はなく、道を見て条件に合わないものを除けば良い ans_list = [True] * n for i in range(m): if h[ab[i][0]] >= h[ab[i][1]]: ans_list[ab[i][1]] = False elif h[ab[i][0]] <...
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(lambda x: x -1, map(int, input().split()))) for _ in range(m)] # 一つづつ展望台を見る必要はなく、道を見て条件に合わないものを除けば良い ans_list = [True] * n for i in range(m): if h[ab[i][0]] >= h[ab[i][1]]: ans_list[ab[i][1]] = False if h[ab[i][0]] <= ...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,435
422,436
u146597538
python
p02689
n, m = list(map(int, input().split())) heights = list(map(int, input().split())) flags = [True] * n count = 0 for _ in range(m): roots = list(map(int, input().split())) if heights[roots[0] - 1] > heights[roots[1] - 1]: flags[roots[1] - 1] = False elif heights[roots[0] - 1] < heights[roots[1] - 1]: flags[r...
n, m = list(map(int, input().split())) heights = list(map(int, input().split())) flags = [True] * n count = 0 for _ in range(m): roots = list(map(int, input().split())) if heights[roots[0] - 1] > heights[roots[1] - 1]: flags[roots[1] - 1] = False elif heights[roots[0] - 1] < heights[roots[1] - 1]: flags[r...
[ "call.add" ]
422,439
422,440
u745861782
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [0]*n for i in range(m): a, b = map(int, input().split()) if h[a-1] >= h[b-1]: ans[a-1] = 1 if h[a-1] <= h[b-1]: ans[b-1] = 1 print(ans.count(1))
n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [1]* n for i in range(m): a, b = map(int, input().split()) if h[a-1] >= h[b-1]: ans[b-1] = 0 if h[a-1] <= h[b-1]: ans[a-1] = 0 print(ans.count(1))
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change", "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
422,441
422,442
u794544096
python
p02689
import sys input = sys.stdin.readline def ppp(n,m,h,ab): g = [1] * n for l,r in ab: if h[l-1] >= h[r-1]: g[r-1] = 0 if h[l-1] <= h[r-1]: g[l-1] = 0 print(sum(g)) if __name__ == "__main__": n,m = map(int,input().split()) h = list(map(int,input().split())) ...
import sys input = sys.stdin.readline def ppp(n,m,h,ab): g = [1] * n for l,r in ab: if h[l-1] >= h[r-1]: g[r-1] = 0 if h[l-1] <= h[r-1]: g[l-1] = 0 print(sum(g)) if __name__ == "__main__": n,m = map(int,input().split()) h = list(map(int,input().split())) ...
[ "identifier.change", "call.arguments.change" ]
422,443
422,444
u625007136
python
p02689
import sys input = sys.stdin.readline def ppp(n,m,h,ab): g = [1] * n for l,r in ab: if h[l-1] >= h[r-1]: g[r-1] = 0 if h[l-1] < h[r-1]: g[l-1] = 0 print(sum(g)) if __name__ == "__main__": n,m = map(int,input().split()) h = list(map(int,input().split())) a...
import sys input = sys.stdin.readline def ppp(n,m,h,ab): g = [1] * n for l,r in ab: if h[l-1] >= h[r-1]: g[r-1] = 0 if h[l-1] <= h[r-1]: g[l-1] = 0 print(sum(g)) if __name__ == "__main__": n,m = map(int,input().split()) h = list(map(int,input().split())) ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,445
422,446
u625007136
python
p02689
n, m = map(int(input().split())) h = list(map(int, input().split())) p = [1]*n max = 0 for i in range(m): a, b = map(int(input().split())) if h[a-1] <= h[b-1]: p[a-1] = 0 if h[a-1] >= h[b-1]: p[b-1] = 0 print(sum(p))
n, m = map(int, (input().split())) h = list(map(int, input().split())) p = [1]*n max = 0 for i in range(m): a, b = map(int, (input().split())) if h[a-1] <= h[b-1]: p[a-1] = 0 if h[a-1] >= h[b-1]: p[b-1] = 0 print(sum(p))
[ "call.arguments.change" ]
422,449
422,450
u274758786
python
p02689
N, M = map(int,input().split()) H = list(map(int,input().split())) ans = [0]*N for _ in range(M): A, B = map(int,input().split()) if H[A-1] >= H[B-1]: ans[A-1] = 1 if H[A-1] <= H[B-1]: ans[B-1] = 1 print(ans.count(1))
N, M = map(int,input().split()) H = list(map(int,input().split())) ans = [0]*N for _ in range(M): A, B = map(int,input().split()) if H[A-1] >= H[B-1]: ans[B-1] = 1 if H[A-1] <= H[B-1]: ans[A-1] = 1 print(ans.count(0))
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change", "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
422,459
422,460
u740267532
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) x=[i for i in range(n)] for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: x[b-1]=0 elif h[a-1]<h[b-1]: x[a-1]=0 else: x[a-1]=0 x[b-1]=0 print(n-x.count(0))
n,m=map(int,input().split()) h=list(map(int,input().split())) x=[i for i in range(1,n+1)] for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: x[b-1]=0 elif h[a-1]<h[b-1]: x[a-1]=0 else: x[a-1]=0 x[b-1]=0 print(n-x.count(0))
[ "call.arguments.add" ]
422,469
422,470
u350093546
python
p02689
N, M = list(map(int, input().split())) tenbodai = [H for H in list(map(int, input().split()))] tenbodai_trail = [set() for i in range(len(tenbodai))] for _ in range(M): #展望台と繋がる道のリストを作成 trail = list(map(int, input().split())) tenbodai_trail[trail[0] - 1].add(trail[1] - 1) tenbodai_trail[trail[1] - 1].add(t...
N, M = list(map(int, input().split())) tenbodai = [H for H in list(map(int, input().split()))] tenbodai_trail = [set() for i in range(len(tenbodai))] for _ in range(M): #展望台と繋がる道のリストを作成 trail = list(map(int, input().split())) tenbodai_trail[trail[0] - 1].add(trail[1] - 1) tenbodai_trail[trail[1] - 1].add(...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,473
422,474
u572122511
python
p02689
N,M = map(int,input().split()) H = list(map(int,input().split())) x = [True] * N for _ in range(M): a,b = map(int,input().split()) if H[a - 1] >= H[b - 1]: x[a - 1] = False if H[b - 1] >= H[a - 1]: x[a - 1] = False print(len([i for i in x if i == True]))
N,M = map(int,input().split()) H = list(map(int,input().split())) x = [True] * N for _ in range(M): a,b = map(int,input().split()) if H[a - 1] >= H[b - 1]: x[b - 1] = False if H[b - 1] >= H[a - 1]: x[a - 1] = False print(len([i for i in x if i == True]))
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,475
422,476
u165641688
python
p02689
N,M=map(int,input().split()) H=list(map(int,input().split())) A=[] for i in range(M): A.append(list(map(int,input().split()))) Q=[0]*N for i in range(M): if H[A[i][0]-1]>=H[A[i][1]-1]: Q[A[i][1]-1]=-10**5 elif H[A[i][0]-1]<=H[A[i][1]-1]: Q[A[i][0]-1]=-10**5 n = sum(x>=0 for x in Q) prin...
N,M=map(int,input().split()) H=list(map(int,input().split())) A=[] for i in range(M): A.append(list(map(int,input().split()))) Q=[0]*N for i in range(M): if H[A[i][0]-1]>=H[A[i][1]-1]: Q[A[i][1]-1]=-10**5 if H[A[i][0]-1]<=H[A[i][1]-1]: Q[A[i][0]-1]=-10**5 n = sum(x>=0 for x in Q) print(...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,483
422,484
u693694535
python
p02689
def main(): n, m = map(int, input().split()) g = [[] for i in range(n+1)] hl = [[] for i in range(n+1)] h = [0] h.extend(list(map(int, input().split()))) for i in range(m): a, b = map(int, input().split()) g[a].append(b) g[b].append(a) g[0].append(0) for i, gi in...
def main(): n, m = map(int, input().split()) g = [[] for i in range(n+1)] hl = [[] for i in range(n+1)] h = [0] h.extend(list(map(int, input().split()))) for i in range(m): a, b = map(int, input().split()) g[a].append(b) g[b].append(a) g[0].append(0) for i, gi in...
[ "assignment.variable.change", "identifier.change", "misc.opposites", "call.function.change", "call.arguments.change", "assignment.value.change" ]
422,492
422,493
u243312682
python
p02689
N,M = [int(x) for x in input().split()] P = dict([(i,True) for i in range(1,N+1)]) H = [0] + [int(x) for x in input().split()] for m in range(M): A,B = [int(x) for x in input().split()] if H[A] >= H[B]: P[B] = False if H[B] >= H[A]: P[A] = False print(P) print(sum(list(P.values())))
N,M = [int(x) for x in input().split()] P = dict([(i,True) for i in range(1,N+1)]) H = [0] + [int(x) for x in input().split()] for m in range(M): A,B = [int(x) for x in input().split()] if H[A] >= H[B]: P[B] = False if H[B] >= H[A]: P[A] = False print(sum(list(P.values())))
[ "call.remove" ]
422,494
422,495
u164029270
python
p02689
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [1 for i in range(len(H))] A = [] B = [] for _ in range(M): temp = list(map(int, input().split())) A.append(temp[0]) B.append(temp[1]) for i in range(M): if H[A[i]-1] > H[B[i]-1]: l[B[i]-1] = 0 elif H[A[i]-1] < H[B[i]-...
N, M = map(int, input().split()) H = list(map(int, input().split())) l = [0 for i in range(len(H))] A = [] B = [] for _ in range(M): temp = list(map(int, input().split())) A.append(temp[0]) B.append(temp[1]) for i in range(M): if H[A[i]-1] > H[B[i]-1]: l[B[i]-1] = 1 elif H[A[i]-1] < H[B[i]-...
[ "literal.number.integer.change", "assignment.value.change" ]
422,515
422,516
u589432040
python
p02689
N, M = map(int, input().split()) c = [0 for _ in range(N)] H = list(map(int, input().split())) for i in range(M): a, b = map(int, input().split()) if H[a-1] < H[b-1]: c[a-1] = 1 elif H[a-1] > H[b-1]: c[b-1] = 1 elif H[a-1] != H[b-1]: c[a-1] = 1 c[b-1] = 1 print(c.count(1))
N, M = map(int, input().split()) c = [1 for _ in range(N)] H = list(map(int, input().split())) for i in range(M): a, b = map(int, input().split()) if H[a-1] < H[b-1]: c[a-1] = 0 elif H[a-1] > H[b-1]: c[b-1] = 0 elif H[a-1] == H[b-1]: c[a-1] = 0 c[b-1] = 0 print(c.count(1))
[ "literal.number.integer.change", "assignment.value.change", "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,520
422,521
u542774596
python
p02689
n,m = [int(x) for x in input().split()] H = [int(x) for x in input().split()] g = [ [] for _ in range(n)] for _ in range(m): a,b = [int(x)-1 for x in input().split()] g[a].append(b) g[b].append(a) vis = [False]*n cnt = 0 for i in range(n): if not vis[i]: vis[i] = True gtr =...
n,m = [int(x) for x in input().split()] H = [int(x) for x in input().split()] g = [ [] for _ in range(n)] for _ in range(m): a,b = [int(x)-1 for x in input().split()] g[a].append(b) g[b].append(a) vis = [False]*n cnt = 0 for i in range(n): if not vis[i]: vis[i] = True gtr =...
[]
422,522
422,523
u424241608
python
p02689
N,M = map(int,input().split()) H=list(map(int,input().split())) l = [[]*i for i in range(N)] print(l) for i in range(M): A,B=map(int,input().split()) l[A-1].append(B) l[B-1].append(A) ans=0 for j in range(N): if all(H[elem-1] < H[j] for elem in l[j])==True: ans +=1 print(ans)
N,M = map(int,input().split()) H=list(map(int,input().split())) l = [[]*i for i in range(N)] for i in range(M): A,B=map(int,input().split()) l[A-1].append(B) l[B-1].append(A) ans=0 for j in range(N): if all(H[elem-1] < H[j] for elem in l[j])==True: ans +=1 print(ans)
[ "call.remove" ]
422,528
422,529
u194472175
python
p02689
N, M = map(int, input().split()) H = list(map(int, input().split())) Q = [list(map(int, input().split())) for _ in range(M)] tmp = [0 for _ in range(N)] for i in range(M): if H[Q[i][0]-1] >= H[Q[i][1]-1]: tmp[Q[i][1]-1] = -1 elif H[Q[i][0]-1]<= H[Q[i][1]-1]: tmp[Q[i][0]-1] = -1 print(N + sum(tmp))
N, M = map(int, input().split()) H = list(map(int, input().split())) Q = [list(map(int, input().split())) for _ in range(M)] tmp = [0 for _ in range(N)] for i in range(M): if H[Q[i][0]-1] >= H[Q[i][1]-1]: tmp[Q[i][1]-1] = -1 if H[Q[i][0]-1]<= H[Q[i][1]-1]: tmp[Q[i][0]-1] = -1 print(N + sum(tmp))
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,535
422,536
u411858517
python
p02689
from sys import stdin,stdout inp = stdin.readline out = stdout.write n,m = map(int,inp().split()) h = [int(u) for u in inp().split()] adj = [[] for _ in range(n)] for i in range(m): u,v = map(int,inp().split()) u -= 1 v -= 1 adj[u].append(v) adj[v].append(u) marked = [False for _ in range(n)] cnt = ...
from sys import stdin,stdout inp = stdin.readline out = stdout.write n,m = map(int,inp().split()) h = [int(u) for u in inp().split()] adj = [[] for _ in range(n)] for i in range(m): u,v = map(int,inp().split()) u -= 1 v -= 1 adj[u].append(v) adj[v].append(u) marked = [False for _ in range(n)] cnt = ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,541
422,542
u696847403
python
p02689
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(int, input().split())) for _ in range(m)] x = [set() for _ in range(n)] for a, b in ab: x[a-1].add(b-1) x[b-1].add(a-1) print(x) ans = 0 for i, xx in enumerate(x): for xxx in xx: if h[i] <= h[xxx]: b...
n, m = map(int, input().split()) h = list(map(int, input().split())) ab = [list(map(int, input().split())) for _ in range(m)] x = [set() for _ in range(n)] for a, b in ab: x[a-1].add(b-1) x[b-1].add(a-1) ans = 0 for i, xx in enumerate(x): for xxx in xx: if h[i] <= h[xxx]: break ...
[ "call.remove" ]
422,547
422,548
u167647458
python
p02689
n, m = map(int,input().split()) h = list(map(int,input().split())) n_ans=[1]*n for i in range(m): a, b = map(int,input().split()) if h[a-1] <= h[b-1] and n_ans[a-1] == 1: n_ans[a-1] = 0 if h[a-1] <= h[a-1] and n_ans[b-1] == 1: n_ans[b-1] = 0 print(sum(n_ans))
n, m = map(int,input().split()) h = list(map(int,input().split())) n_ans=[1]*n for i in range(m): a, b = map(int,input().split()) if h[a-1] <= h[b-1] and n_ans[a-1] == 1: n_ans[a-1] = 0 if h[b-1] <= h[a-1] and n_ans[b-1] == 1: n_ans[b-1] = 0 print(sum(n_ans))
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
422,560
422,561
u375695365
python
p02689
import numpy as np argList = list(map(int, input().split())) heights = list(map(int, input().split())) #いい展望台フラグ check = np.array([1]*argList[0]) for n in range(argList[1]): #どことどこをつないでいるか con = list(map(int, input().split())) #低かったらいい展望台ではない if heights[con[0]-1] < heights[con[1]-1]: check[...
import numpy as np argList = list(map(int, input().split())) heights = list(map(int, input().split())) #いい展望台フラグ check = np.array([1]*argList[0]) for n in range(argList[1]): #どことどこをつないでいるか con = list(map(int, input().split())) #低かったらいい展望台ではない if heights[con[0]-1] <= heights[con[1]-1]: check...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,566
422,567
u089121621
python
p02689
import sys import math import itertools n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [True] * n lis = [0] * n for i in range(m): a, b = map(int, input().split()) lis[a - 1] = max(lis[a - 1], h[b - 1]) lis[b - 1] = max(lis[b - 1], h[a - 1]) ans = 0 for i in range(n): if lis...
import sys import math import itertools n, m = map(int, input().split()) h = list(map(int, input().split())) ans = [True] * n lis = [0] * n for i in range(m): a, b = map(int, input().split()) lis[a - 1] = max(lis[a - 1], h[b - 1]) lis[b - 1] = max(lis[b - 1], h[a - 1]) ans = 0 for i in range(n): if lis...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,576
422,577
u469281291
python
p02689
import sys import math n, m = map(int, input().split()) h = list(map(int, input().split())) ma = [0] * n for i in range(m): a, b = map(int, input().split()) ma[a - 1] = max(ma[a-1],h[b - 1]) ma[b - 1] = max(ma[b-1] ,h[a - 1]) cnt = 0 for i in range(n): if h[i] >= ma[i]: cnt += 1 print(cnt)
import sys import math n, m = map(int, input().split()) h = list(map(int, input().split())) ma = [0] * n for i in range(m): a, b = map(int, input().split()) ma[a - 1] = max(ma[a-1],h[b - 1]) ma[b - 1] = max(ma[b-1] ,h[a - 1]) cnt = 0 for i in range(n): if h[i] > ma[i]: cnt += 1 print(cnt)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,578
422,579
u469281291
python
p02689
n, m = tuple(map(int, input().split(' '))) h = list(map(int, input().split(' '))) adj = [[] for i in range(n)] for i in range(m): a, b = tuple(map(int, input().split(' '))) a -= 1 b -= 1 adj[a].append(b) adj[b].append(a) ans = 0 for i in range(n): if len(adj[i]) == 0: ans += 1 else: for j in adj[i...
n, m = tuple(map(int, input().split(' '))) h = list(map(int, input().split(' '))) adj = [[] for i in range(n)] for i in range(m): a, b = tuple(map(int, input().split(' '))) a -= 1 b -= 1 adj[a].append(b) adj[b].append(a) ans = 0 for i in range(n): if len(adj[i]) == 0: ans += 1 else: ok = True ...
[ "assignment.add", "assignment.remove" ]
422,580
422,581
u297045966
python
p02689
n,m = map(int, input().split()) height = list(map(int, input().split())) roads = [[] for i in range(n)] for i in range(m): x,y = map(int, input().split()) roads[x-1].append(y-1) roads[y-1].append(x-1) print(roads) bestcount = 0 for i in range(n): best = 1 # 良い展望台なら1 for j in roads[i]: if...
n,m = map(int, input().split()) height = list(map(int, input().split())) roads = [[] for i in range(n)] for i in range(m): x,y = map(int, input().split()) roads[x-1].append(y-1) roads[y-1].append(x-1) bestcount = 0 for i in range(n): best = 1 # 良い展望台なら1 for j in roads[i]: if (height[j] >=...
[ "call.remove" ]
422,582
422,583
u749742659
python
p02689
def resolve(): num_ten, num_load = map(int, input().split()) hiehgts = list(map(int, input().split())) tenbos = [[]for i in range(num_ten)] ans = 0 for i in range(num_load): a, b = map(int, input().split()) tenbos[a-1].append(b-1) tenbos[b-1].append(a-1) for index in ran...
def resolve(): num_ten, num_load = map(int, input().split()) hiehgts = list(map(int, input().split())) tenbos = [[]for i in range(num_ten)] ans = 0 for i in range(num_load): a, b = map(int, input().split()) tenbos[a-1].append(b-1) tenbos[b-1].append(a-1) for index in ran...
[ "control_flow.branch.if.condition.change" ]
422,590
422,591
u574922408
python
p02689
n,m = map(int,input().split()) H = list(map(int,input().split())) edge = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) a -= 1 b -= 1 edge[a].append(b) edge[b].append(a) ans = 0 for i in range(n): x = edge[i] if len(x) == 0: ans += 1 break ...
n,m = map(int,input().split()) H = list(map(int,input().split())) edge = [[] for _ in range(n)] for _ in range(m): a,b = map(int,input().split()) a -= 1 b -= 1 edge[a].append(b) edge[b].append(a) ans = 0 for i in range(n): x = edge[i] if len(x) == 0: ans += 1 continu...
[ "control_flow.break.remove", "control_flow.continue.add" ]
422,592
422,593
u883040023
python
p02689
N,M= map(int,input().split()) h = [int(i) for i in input().split()] judge = [True]*N for i in range (M): a,b= map(int,input().split()) if h[a - 1] > h[b - 1]: judge[b-1] = False if h[a - 1] < h[b - 1]: judge[a - 1] = False if h[a - 1] == h[b - 1]: judge[b-1] = False jud...
N,M= map(int,input().split()) h = [int(i) for i in input().split()] judge = [True]*N for i in range (M): a,b= map(int,input().split()) if h[a - 1] > h[b - 1]: judge[b-1] = False if h[a - 1] < h[b - 1]: judge[a - 1] = False if h[a - 1] == h[b - 1]: judge[b-1] = False jud...
[ "identifier.change", "call.arguments.change", "io.output.change" ]
422,596
422,597
u139940813
python
p02689
n,m=map(int,input().split(" ")) h=list(map(int,input().split(" "))) g=[1]*n for i in range(m): r=list(map(int,input().split(" "))) if h[r[0]-1]<h[r[1]-1]: g[r[0]-1]*=0 elif h[r[0]-1]>h[r[1]-1]: g[r[1]-1]*=0 print(sum(g))
n,m=map(int,input().split(" ")) h=list(map(int,input().split(" "))) g=[1]*n for i in range(m): r=list(map(int,input().split(" "))) if h[r[0]-1]<=h[r[1]-1]: g[r[0]-1]*=0 if h[r[0]-1]>=h[r[1]-1]: g[r[1]-1]*=0 print(sum(g))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,598
422,599
u847923740
python
p02689
n,m = map(int, input().split()) h_a = list(map(int, input().split())) m_l = [[0,0]]*m r_l = [{}]*n for i in range(m): r = list(map(int, input().split())) a = r[0] - 1 b = r[1] - 1 ral = set([]) if len(r_l[a]) == 0 else r_l[a] rbl = set([]) if len(r_l[b]) == 0 else r_l[b] ral.add(b) rbl.add(a) r_l[a]...
n,m = map(int, input().split()) h_a = list(map(int, input().split())) m_l = [[0,0]]*m r_l = [{}]*n for i in range(m): r = list(map(int, input().split())) a = r[0] - 1 b = r[1] - 1 ral = set([]) if len(r_l[a]) == 0 else r_l[a] rbl = set([]) if len(r_l[b]) == 0 else r_l[b] ral.add(b) rbl.add(a) r_l[a]...
[ "call.remove" ]
422,627
422,628
u552741877
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) count=[1]*n for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: count[b-1]=0 elif h[a-1]==h[b-1]: count[a-1]=0 count[b-1]=0 else: count[b-1]=0 print(sum(count))
n,m=map(int,input().split()) h=list(map(int,input().split())) count=[1]*n for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: count[b-1]=0 elif h[a-1]==h[b-1]: count[a-1]=0 count[b-1]=0 else: count[a-1]=0 print(sum(count))
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,631
422,632
u257265865
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) count=[1]*m for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: count[b-1]=0 elif h[a-1]==h[b-1]: count[a-1]=0 count[b-1]=0 else: count[b-1]=0 print(sum(count))
n,m=map(int,input().split()) h=list(map(int,input().split())) count=[1]*n for i in range(m): a,b=map(int,input().split()) if h[a-1]>h[b-1]: count[b-1]=0 elif h[a-1]==h[b-1]: count[a-1]=0 count[b-1]=0 else: count[a-1]=0 print(sum(count))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "assignment.variable.change", "variable_access.subscript.index.change" ]
422,633
422,632
u257265865
python
p02689
N,M=map(int, input().split()) H=list(map(int,input().split())) List=[list(map(int,input().split())) for i in range(M)] sup_list=[1 for i in range(N)] for j in range(M): if H[List[j][0]-1]>H[List[j][1]-1]: sup_list[List[j][1]-1]=0 elif H[List[j][0]-1]==H[List[j][1]-1]: sup_list[List[j][0]-1]=0 ...
N,M=map(int, input().split()) H=list(map(int,input().split())) List=[list(map(int,input().split())) for i in range(M)] sup_list=[1 for i in range(N)] for j in range(M): if H[List[j][0]-1]>H[List[j][1]-1]: sup_list[List[j][1]-1]=0 elif H[List[j][0]-1]==H[List[j][1]-1]: sup_list[List[j][0]-1]=0 ...
[ "call.remove" ]
422,638
422,639
u942051624
python
p02689
N,M=map(int, input().split()) H=list(map(int,input().split())) List=[list(map(int,input().split())) for i in range(M)] sup_list=[1 for i in range(N)] for j in range(M): if H[List[j][0]-1]>H[List[j][1]-1]: sup_list[List[j][1]-1]=0 elif H[List[j][0]-1]==H[List[j][1]-1]: sup_list[List[j][0]-1]=0 ...
N,M=map(int, input().split()) H=list(map(int,input().split())) List=[list(map(int,input().split())) for i in range(M)] sup_list=[1 for i in range(N)] for j in range(M): if H[List[j][0]-1]>H[List[j][1]-1]: sup_list[List[j][1]-1]=0 elif H[List[j][0]-1]==H[List[j][1]-1]: sup_list[List[j][0]-1]=0 ...
[ "literal.number.integer.change", "assignment.variable.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,640
422,639
u942051624
python
p02689
N, M = map(int, input().split()) H = [int(h) for h in input().split()] flag = [1 for i in range(N)] for i in range(M): a, b = map(int, input().split()) if H[a-1] < H[b-1]: flag[a-1] = 0 elif H[a-1] > H[b-1]: flag[b-1] = 0 print(sum(flag))
N, M = map(int, input().split()) H = [int(h) for h in input().split()] flag = [1 for i in range(N)] for i in range(M): a, b = map(int, input().split()) if H[a-1] <= H[b-1]: flag[a-1] = 0 if H[a-1] >= H[b-1]: flag[b-1] = 0 print(sum(flag))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,665
422,666
u886362575
python
p02689
N,M=map(int,input().split()) H=list(map(int,input().split)) check=[0]*N for i in range(M): A,B=map(int,input.split) if H[A-1]>H[B-1]: check[B-1]=check[B-1]+1 elif H[A-1]<H[B-1]: check[A-1]=check[A-1]+1 else: check[A-1]+=1 check[B-1]+=1 ans=check.count(0) print(ans)
N,M=map(int,input().split()) H=list(map(int,input().split())) check=[0]*N for i in range(M): A,B=map(int,input().split()) if H[A-1]>H[B-1]: check[B-1]=check[B-1]+1 elif H[A-1]<H[B-1]: check[A-1]=check[A-1]+1 else: check[A-1]+=1 check[B-1]+=1 ans=check.count(0) print(ans)
[ "call.add" ]
422,676
422,675
u436660228
python
p02689
N,M = map(int,input().split()) H=list(map(int,input().split())) ABmap=[[] for i in range(N)] count=0 for i in range(M): A,B=map(lambda x:x-1,map(int,input().split())) ABmap[A].append(H[B]) ABmap[B].append(H[A]) for i in range(N): if len(ABmap[i])==0: count+=1 elif max(ABmap[i])<H[i]...
N,M = map(int,input().split()) H=list(map(int,input().split())) ABmap=[[] for i in range(N)] count=0 for i in range(M): A,B=map(lambda x:x-1,map(int,input().split())) ABmap[A].append(H[B]) ABmap[B].append(H[A]) for i in range(N): if len(ABmap[i])==0: count+=1 elif max(ABmap[i])<H[i]...
[ "call.add" ]
422,693
422,694
u913392095
python
p02689
N, M = map(int, input().split(" ")) flag = [1 for i in range(M)] height = list(map(int, input().split(" "))) for i in range(M): a, b = map(int, input().split(" ")) if height[a - 1] < height[b - 1]: flag[a - 1] = 0 elif height[a - 1] > height[b - 1]: flag[b - 1] = 0 else: flag[a - 1] = 0 flag[b -...
N, M = map(int, input().split(" ")) flag = [1 for i in range(N)] height = list(map(int, input().split(" "))) for i in range(M): a, b = map(int, input().split(" ")) if height[a - 1] < height[b - 1]: flag[a - 1] = 0 elif height[a - 1] > height[b - 1]: flag[b - 1] = 0 else: flag[a - 1] = 0 flag[b -...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,695
422,696
u536034761
python
p02689
N, M = map(int, input().split(" ")) flag = [1 for i in range(M)] height = list(map(int, input().split(" "))) for i in range(M): a, b = map(int, input().split(" ")) if height[a - 1] < height[b - 1]: flag[a - 1] = 0 elif height[a - 1] > height[b - 1]: flag[b - 1] = 0 else: flag[a - 1] = flag[b - 1] = ...
N, M = map(int, input().split(" ")) flag = [1 for i in range(N)] height = list(map(int, input().split(" "))) for i in range(M): a, b = map(int, input().split(" ")) if height[a - 1] < height[b - 1]: flag[a - 1] = 0 elif height[a - 1] > height[b - 1]: flag[b - 1] = 0 else: flag[a - 1] = 0 flag[b -...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,697
422,696
u536034761
python
p02689
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) n,m=i2() h=intl() cnt=0 score=0 l=[[] for i in range(n)] for j in range(m): a,b=i2() l[a-1].append(b-1) l[b-1...
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) n,m=i2() h=intl() cnt=0 score=0 l=[[] for i in range(n)] for j in range(m): a,b=i2() l[a-1].append(b-1) l[b-1...
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,719
422,720
u629607744
python
p02689
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) n,m=i2() h=intl() cnt=0 score=0 l=[[] for i in range(n)] for j in range(m): a,b=i2() l[a-1].append(b-1) l[b-1...
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) n,m=i2() h=intl() cnt=0 score=0 l=[[] for i in range(n)] for j in range(m): a,b=i2() l[a-1].append(b-1) l[b-1...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
422,721
422,720
u629607744
python
p02689
N,M=map(int,input().split()) H=list(map(int,input().split())) ans=[0]*N #N個のメモ欄を用意 for i in range(M): A,B=map(int,input().split()) if H[A-1]<H[B-1]: #A,Bで繋がれた展望台のうち、低いほうに印を着けていく。 ans[A-1]+=1 elif H[B-1]<H[A-1]: ans[A-1]+=1 else: #AとBの標高が同じならどちらにも印をつける。 ans[A-1]+=1 ...
N,M=map(int,input().split()) H=list(map(int,input().split())) ans=[0]*N #N個のメモ欄を用意 for i in range(M): A,B=map(int,input().split()) if H[A-1]<H[B-1]: #A,Bで繋がれた展望台のうち、低いほうに印を着けていく。 ans[A-1]+=1 elif H[B-1]<H[A-1]: ans[B-1]+=1 #ここのB間違えとるやないかい else: #AとBの標高が同じならどちらにも印をつける。 ...
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,722
422,723
u122598824
python
p02689
N,M=map(int,input().split()) H=list(map(int,input().split())) ans=[0]*N #N個のメモ欄を用意 for i in range(M): A,B=map(int,input().split()) if H[A-1]<H[B-1]: #A,Bで繋がれた展望台のうち、低いほうに印を着けていく。 ans[A-1]=1 elif H[B-1]<H[A-1]: ans[A-1]=1 else: #AとBの標高が同じならどちらにも印をつける。 ans[A-1]=1 a...
N,M=map(int,input().split()) H=list(map(int,input().split())) ans=[0]*N #N個のメモ欄を用意 for i in range(M): A,B=map(int,input().split()) if H[A-1]<H[B-1]: #A,Bで繋がれた展望台のうち、低いほうに印を着けていく。 ans[A-1]+=1 elif H[B-1]<H[A-1]: ans[B-1]+=1 #ここのB間違えとるやないかい else: #AとBの標高が同じならどちらにも印をつける。 ...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,724
422,723
u122598824
python
p02689
def q3(): N, M = (int(i) for i in input().split()) H = [int(i) for i in input().split()] ans = [True]*N for i in range(M): A, B = (int(i) for i in input().split()) if H[A-1] <= H[B-1]: ans[A-1] = False if H[B-1] <= H[A-1]: ans[B-1] = False print(ans...
def q3(): N, M = (int(i) for i in input().split()) H = [int(i) for i in input().split()] ans = [True]*N for i in range(M): A, B = (int(i) for i in input().split()) if H[A-1] <= H[B-1]: ans[A-1] = False if H[B-1] <= H[A-1]: ans[B-1] = False print(ans...
[ "call.add" ]
422,739
422,740
u894074703
python
p02689
N,M = map(int,input().split()) H = list(map(int,input().split())) W = [1 for i in range(N)] for i in range(M): a,b = map(int,input().split()) if H[a-1] >= H[b-1]: W[b-1] = 0 if H[b-1] >= H[a]: W[a-1] = 0 ans = 0 for i in W: ans += i print(ans)
N,M = map(int,input().split()) H = list(map(int,input().split())) W = [1 for i in range(N)] for i in range(M): a,b = map(int,input().split()) if H[a-1] >= H[b-1]: W[b-1] = 0 if H[b-1] >= H[a-1]: W[a-1] = 0 ans = 0 for i in W: ans += i print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
422,750
422,751
u183896397
python
p02689
N,M = map(int,input().split()) H = list(map(int,input().split())) W = [1 for i in range(N)] for i in range(M): a,b = map(int,input().split()) if H[a-1] >= H[b-1]: W[b-1] = 0 elif H[b-1] >= H[a-1]: W[a-1] = 0 ans = 0 for i in W: ans += i print(ans)
N,M = map(int,input().split()) H = list(map(int,input().split())) W = [1 for i in range(N)] for i in range(M): a,b = map(int,input().split()) if H[a-1] >= H[b-1]: W[b-1] = 0 if H[b-1] >= H[a-1]: W[a-1] = 0 ans = 0 for i in W: ans += i print(ans)
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
422,753
422,751
u183896397
python
p02689
n,m = map(int,input().split()) height = list(map(int,input().split())) lst = [0]*n for j in range(m): x,y = map(int,input().split()) if height[x-1] >= height[y-1]: lst[x-1] = 1 if height[x-1] <= height[y-1]: lst[y-1] = 1 print(lst.count(0))
n,m = map(int,input().split()) height = list(map(int,input().split())) lst = [0]*n for j in range(m): x,y = map(int,input().split()) if height[x-1] >= height[y-1]: lst[y-1] = 1 if height[x-1] <= height[y-1]: lst[x-1] = 1 print(lst.count(0))
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
422,754
422,755
u047719604
python
p02689
#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS(): return [list(x) for x in s...
#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS(): return [list(x) for x in s...
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "assignment.variable.change", "expression.operation.binary.change" ]
422,764
422,765
u392552629
python
p02689
# -*- coding: utf-8 -*- N, M = map(int, input().split()) H = list(map(int, input().split())) C = [0]*N for i in range(M): A, B = map(int, input().split()) if H[A-1] > H[B-1]: C[B-1]=1 if H[A-1] < H[B-1]: C[A-1]=1 if H[A-1] == H[B-1]: if C[A-1]==1: ...
# -*- coding: utf-8 -*- N, M = map(int, input().split()) H = list(map(int, input().split())) C = [0]*N for i in range(M): A, B = map(int, input().split()) if H[A-1] >= H[B-1]: C[B-1]=1 if H[A-1] <= H[B-1]: C[A-1]=1 if H[A-1] == H[B-1]: if C[A-1]==1: C[B-1]...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
422,777
422,778
u268724304
python
p02689
# -*- coding: utf-8 -*- N, M = map(int, input().split()) H = list(map(int, input().split())) C = [0]*N for i in range(M): A, B = map(int, input().split()) if H[A-1] > H[B-1]: C[B-1]=1 if H[A-1] < H[B-1]: C[A-1]=1 if H[A-1] == H[B-1]: if H[A-1]==1: C[B-1] = 1 ...
# -*- coding: utf-8 -*- N, M = map(int, input().split()) H = list(map(int, input().split())) C = [0]*N for i in range(M): A, B = map(int, input().split()) if H[A-1] >= H[B-1]: C[B-1]=1 if H[A-1] <= H[B-1]: C[A-1]=1 if H[A-1] == H[B-1]: if C[A-1]==1: C[B-1]...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.change" ]
422,779
422,778
u268724304
python
p02689
n,m=map(int,input().split()) H=list(map(int,input().split())) lb=[True]*n for r in range(m): a,b=input().split() a,b=int(a)-1,int(b)-1 if H[a]>H[b]: lb[b]=False elif H[a]<H[b]: lb[a]=False else: lb[a]=False lb[b]=False lb.count(True)
n,m=map(int,input().split()) H=list(map(int,input().split())) lb=[True]*n for r in range(m): a,b=input().split() a,b=int(a)-1,int(b)-1 if H[a]>H[b]: lb[b]=False elif H[a]<H[b]: lb[a]=False else: lb[a]=False lb[b]=False print(lb.count(True))
[ "call.add", "call.arguments.change" ]
422,782
422,783
u331330867
python
p02689
n,m=map(int,input().split()) h=list(map(int,input().split())) ans=[True]*n for i in range(m): a,b=map(int,input().split()) a,b=a-1,b-1 ha=h[a] hb=h[b] if ha>hb: ans[b]=False if hb>ha: ans[a]=False else: ans[a]=False ans[b]=False cnt=0 for f in ans: if f: ...
n,m=map(int,input().split()) h=list(map(int,input().split())) ans=[True]*n for i in range(m): a,b=map(int,input().split()) a,b=a-1,b-1 ha=h[a] hb=h[b] if ha>hb: ans[b]=False elif hb>ha: ans[a]=False else: ans[a]=False ans[b]=False cnt=0 for f in ans: if f...
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
422,789
422,790
u723583932
python
p02689
N,M=map(int,input().split()) h=list(map(int,input().split())) t=[0]*N for i in range(M): A,B=map(int,input().split()) t[A-1] = max(t[A-1], H[B-1]) t[B-1] = max(t[B-1], H[A-1]) ct=0 for j in range(N): if H[j]>[j]: ct+=1 print(ct)
N,M=map(int,input().split()) h=list(map(int,input().split())) t=[0]*N for i in range(M): A,B=map(int,input().split()) t[A-1] = max(t[A-1], h[B-1]) t[B-1] = max(t[B-1], h[A-1]) ct=0 for j in range(N): if h[j]>t[j]: ct+=1 print(ct)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "control_flow.branch.if.condition.change" ]
422,799
422,800
u434296044
python
p02689
n,m=map(int,input().split()) h=list(map,input().split()) x=[[] for i in range(n)] for i in range(m): a,b=map(int,input().split()) x[a-1].append(b-1) x[b-1].append(a-1) c=0 for i in range(n): f=1 maxh=0 for j in x[i]: maxh=max(maxh,h[j]) if maxh>=h[i]: f=0 c+=f print(c)
n,m=map(int,input().split()) h=list(map(int,input().split())) x=[[] for i in range(n)] for i in range(m): a,b=map(int,input().split()) x[a-1].append(b-1) x[b-1].append(a-1) c=0 for i in range(n): f=1 maxh=0 for j in x[i]: maxh=max(maxh,h[j]) if maxh>=h[i]: f=0 c+=f print(c)
[ "call.arguments.add", "call.arguments.change" ]
422,801
422,802
u375006224
python
p02689
N,M=map(int,input().split()) H=list(map(int,input().split())) AB=[list(map(int,input().split())) for i in range(M)] hasi=[0]*N ans=N for i in range(M): if H[AB[i][0]-1]>H[AB[i][1]-1]: hasi[AB[i][1]-1]+=1 elif H[AB[i][0]-1]<H[AB[i][1]-1]: hasi[AB[i][0]-1]+=1 else: hasi[AB[i][0]-1]+=1 ...
N,M=map(int,input().split()) H=list(map(int,input().split())) AB=[list(map(int,input().split())) for i in range(M)] hasi=[0]*N for i in range(M): if H[AB[i][0]-1]>H[AB[i][1]-1]: hasi[AB[i][1]-1]+=1 elif H[AB[i][0]-1]<H[AB[i][1]-1]: hasi[AB[i][0]-1]+=1 else: hasi[AB[i][0]-1]+=1 ...
[ "expression.operation.binary.remove" ]
422,803
422,804
u671211357
python