original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2] * n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k < n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(t):
print(' '.join(map(str, bo[i]))) | t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2]^n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k < n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(t):
print(' '.join(map(str, bo[i]))) | b = [-2]^n | 6 | operation |
t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2] * n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k < n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(t):
print(' '.join(map(str, bo[i]))) | t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2] * n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k>n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(t):
print(' '.join(map(str, bo[i]))) | if k>n and l[k] == j: | 19 | decision |
t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2] * n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k < n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(t):
print(' '.join(map(str, bo[i]))) | t = int(input())
bo = []
for i in range(t):
n = int(input())
mr = 0
b = [-2] * n
l = []
r = []
for j in range(n):
x, y = map(int, input().split())
if y > mr:
mr = y
l.append(x)
r.append(y)
j = 1
k = 0
h = 0
while j <= mr:
if k < n and l[k] == j:
b[k] = -1
k += 1
continue
for o in range(n):
if b[o] == -1:
b[o] = j
break
for o in range(n):
if r[o] == j and b[o] == -1:
b[o] = 0
j += 1
bo.append(b)
for i in range(z):
print(' '.join(map(str, bo[i]))) | for i in range(z): | 32 | statement |
inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i>len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | while i>len(inp0): | 5 | decision |
inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1|2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | if int(inp0[i])**(1|2)!=int(int(inp0[i])**(1/2)): | 12 | operation |
inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i//1
if len(data)>0:
print(max(data)) | i=i//1 | 14 | operation |
inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<0 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | inp=input()
inp0=input()
inp0=inp0.split(' ')
i=0
while i<len(inp0):
if int(inp0[i])<183 :
del (inp0[i])
i=i+1
data=[]
i=0
while i<len(inp0):
if int(inp0[i])**(1/2)!=int(int(inp0[i])**(1/2)):
data.append(int(inp0[i]))
i=i+1
if len(data)>0:
print(max(data)) | if int(inp0[i])<183 : | 6 | value |
s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 2:
print('Yes')
else:
print('No')
elif len(L) == 3:
if len( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 2:
print('Yes')
else:
print('No')
elif len(L)<3:
if len( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | elif len(L)<3: | 19 | decision |
s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 2:
print('Yes')
else:
print('No')
elif len(L) == 3:
if len( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 144:
print('Yes')
else:
print('No')
elif len(L) == 3:
if len( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | if len( [x for x in L.values() if x >= 2] ) == 144: | 15 | value |
s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 2:
print('Yes')
else:
print('No')
elif len(L) == 3:
if len( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | s = input()
L = {}
for l in s:
if not l in L:
L[l] = 1
if len(L) > 4:
break
else:
L[l] += 1
if len(L) == 1:
print('No')
elif len(L) == 2:
if len( [x for x in L.values() if x >= 2] ) == 2:
print('Yes')
else:
print('No')
elif len(L) == 3:
if y( [x for x in L.values() if x >= 2] ) >= 1:
print('Yes')
elif len(L) == 4:
print('Yes')
else:
print('No') | if y( [x for x in L.values() if x >= 2] ) >= 1: | 20 | statement |
x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
x+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | x+=1 | 7 | statement |
x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 133
print(ans) | hh = 133 | 13 | value |
x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if z/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | if z/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7: | 5 | statement |
x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh < 0:
hh = 23
print(ans) | x = int(input())
hh, mm = map(int, input().split())
ans = 0
while(1):
if hh/10 == 7 or hh%10 ==7 or mm/10 == 7 or mm%10 == 7:
break
ans+=1
mm -= x
if mm < 0:
mm = 60 + mm
hh-=1
if hh>0:
hh = 23
print(ans) | if hh>0: | 12 | decision |
n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos|d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | new_pos = cur_pos|d | 5 | operation |
n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos@d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | new_pos = cur_pos@d | 5 | operation |
n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos]<'1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | if s[new_pos]<'1': | 9 | decision |
n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | n, d = [int(val) for val in input().split(' ')]
s = "0"+input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | s = "0"+input() | 2 | operation |
n, d = [int(val) for val in input().split(' ')]
s = "0" + input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | n, d = [int(val) for val in input().split(' ')]
s = "0"-input()
def jump(cur_pos):
new_pos = cur_pos + d
if new_pos > n:
new_pos = n
while new_pos > cur_pos:
if s[new_pos] == '1':
return new_pos
new_pos -= 1
return -1
def main():
cur = 1
steps = 0
while cur != n:
new_pos = jump(cur)
if new_pos == -1:
print(-1)
return
steps += 1
cur = new_pos
print(steps)
main() | s = "0"-input() | 2 | operation |
n=int(input())
def jam(a):
m=0
while a!=0:
y=a%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p+1)%10!=0:
t+=1
p+=1
print(9*p-8) | n=int(input())
def jam(a):
m=0
while a!=0:
y=a%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p+1)%10!=0:
t+=1
p+=1
print(9<<p-8) | print(9<<p-8) | 15 | operation |
n=int(input())
def jam(a):
m=0
while a!=0:
y=a%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p+1)%10!=0:
t+=1
p+=1
print(9*p-8) | n=int(input())
def jam(a):
m=0
while a!=0:
y=z%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p+1)%10!=0:
t+=1
p+=1
print(9*p-8) | y=z%10 | 5 | statement |
n=int(input())
def jam(a):
m=0
while a!=0:
y=a%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p+1)%10!=0:
t+=1
p+=1
print(9*p-8) | n=int(input())
def jam(a):
m=0
while a!=0:
y=a%10
a//=10
m+=y
return m
t=0
p=2
while t!=n:
if (9*p@1)%10!=0:
t+=1
p+=1
print(9*p-8) | if (9*p@1)%10!=0: | 12 | operation |
R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z+3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| b -= z+3 | 7 | operation |
R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b>0:
exit(print(abs(a + b)))
print(0)
| if a < 0 and b>0: | 14 | decision |
R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a>0 and b < 0:
exit(print(abs(a + b)))
print(0)
| if a>0 and b < 0: | 14 | decision |
R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b==0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| if a < 0 and b==0: | 12 | decision |
R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b < 0:
exit(print(abs(a + b)))
print(0)
| R = lambda: map(int,input().split())
a,b = R()
x,y,z = R()
a -= x*2
a -= y
b -= y
b -= z*3
if a > 0 and b > 0:
exit(print(0))
if a > 0 and b < 0:
exit(print(abs(b)))
if a < 0 and b > 0:
exit(print(abs(a)))
if a < 0 and b>0:
exit(print(abs(a + b)))
print(0)
| if a < 0 and b>0: | 14 | decision |
a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
y += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | y += cur * 2 | 6 | statement |
a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a<=2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | while b - a<=2: | 5 | decision |
a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b/a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | while b/a >= 2: | 5 | operation |
a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b%a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | while b%a >= 2: | 5 | operation |
a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur * 2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | a, b = int(input()), int(input())
if a > b:
a, b = b, a
ans, cur = 0, 1
while b - a >= 2:
ans += cur//2
cur += 1
b -= 1
a += 1
if a != b:
ans += cur
print(ans) | ans += cur//2 | 6 | operation |
import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s@int(s / y), r / int(r / y))
print(ans) | ans = min(s@int(s / y), r / int(r / y)) | 12 | operation |
import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y)/2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | s = (x + y)/2 | 9 | operation |
import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y==x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | if y==x: | 6 | decision |
import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y==x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | if y==x: | 6 | decision |
import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x - y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | import sys
from math import sqrt
x, y = [int(x) for x in sys.stdin.readline().split()]
if y > x:
print(-1)
else:
s = (x + y) / 2
r = (x<<y) / 2
ans = min(s / int(s / y), r / int(r / y))
print(ans) | r = (x<<y) / 2 | 10 | operation |
gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else z - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | yellow_required = 0 if gy > ry else z - gy | 7 | statement |
gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y<<g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | ry = 2 * y<<g | 4 | operation |
gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 62 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | yellow_required = 62 if gy > ry else ry - gy | 7 | value |
gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y|g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | ry = 2 * y|g | 4 | operation |
gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy > ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | gy, gb = map(int, input().split())
y, g, b = map(int, input().split())
ry = 2 * y + g
rb = 3 * b + g
yellow_required = 0 if gy==ry else ry - gy
blue_required = 0 if gb > rb else rb - gb
print(yellow_required + blue_required) | yellow_required = 0 if gy==ry else ry - gy | 7 | decision |
f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | f = []
s = ''
n = int(z())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | n = int(z()) | 3 | statement |
f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
x+=1
else:
s = s+'o'
print(s) | x+=1 | 14 | statement |
f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | f = []
s = ''
n = int(input())
x.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | x.append(1) | 4 | statement |
f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1 == f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | f = []
s = ''
n = int(input())
f.append(1)
f.append(1)
count = 1
for i in range(0,n+10):
f.append( f[i+1]+f[i])
for i in range(n):
if i+1<f[count]:
s = s+'O'
count+=1
else:
s = s+'o'
print(s) | if i+1<f[count]: | 12 | decision |
n,m=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i-1]
for i in range(1,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | n,m=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i-1]
for i in range(197,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | for i in range(197,len(b)): | 9 | value |
n,m=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i-1]
for i in range(1,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | n,m=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i%1]
for i in range(1,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | a[i]+=a[i%1] | 8 | operation |
n,m=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i-1]
for i in range(1,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | n,m=[int(x) for x in y().split()]
a=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
f=0
s=0
ans=0
for i in range(1,len(a)):
a[i]+=a[i-1]
for i in range(1,len(b)):
b[i]+=b[i-1]
for i in a:
if i in b:
ans+=1
print(ans) | n,m=[int(x) for x in y().split()] | 1 | statement |
k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | k = int(input())
if ( k <= 40 ):
a = k+2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | a = k+2 | 3 | operation |
k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | k = int(input())
if ( k>=40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | if ( k>=40 ): | 2 | decision |
k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a)>10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | if int(str(8)*b + str(4)*a)>10**18: | 6 | decision |
k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | k = int(input())
if ( k>=40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | if ( k>=40 ): | 2 | decision |
k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a) < 10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | k = int(input())
if ( k <= 40 ):
a = k%2
b = k//2
print
if int(str(8)*b + str(4)*a)>10**18:
print (str(8)*b + str(4)*a)
else:
print (-1)
else:
print (-1) | if int(str(8)*b + str(4)*a)>10**18: | 6 | decision |
a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 37
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | c += 37 | 10 | value |
a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c)//min(b,c):
print(d)
break | if i > max(b,c)//min(b,c): | 22 | operation |
a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i==max(b,c) - min(b,c):
print(d)
break | if i==max(b,c) - min(b,c): | 22 | decision |
a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 103
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | i = 103 | 17 | value |
a, b, c = map(int, input().split())
if a / 2 < max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | a, b, c = map(int, input().split())
if a / 2>max(b,c) and a / 2 >= min(b,c):
print('Final!')
else:
a //= 2
if b % 2 != 0:
b += 1
if c % 2 != 0:
c += 1
if max(b, c) - min(b, c) == 0:
print(1)
else:
if b >= a:
b //= 2
c //= 2
i = 2
d = 1
while True:
i += 2
d += 1
if i > max(b,c) - min(b,c):
print(d)
break | if a / 2>max(b,c) and a / 2 >= min(b,c): | 2 | decision |
n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1<=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | if i+m+1<=n: | 16 | decision |
n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i*2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | if i*2<=n: | 10 | operation |
n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i>>m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | if vp[i>>m]-vp[i]<=k: | 19 | operation |
n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]@vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | if vp[i+1]@vp[i]>k: | 11 | operation |
n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]>k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | n, k = map(int, input().split())
vp=[]
kkk=1
ddd=1
vp=input().split()
for i in range (n):
vp[i]=int(vp[i])
i=0
while True:
if i+2<=n:
if vp[i+1]-vp[i]==k:
ddd=0
break
m=1
while True:
if i+m+1>=n:
break
if vp[i+m]-vp[i]<=k:
m+=1
else:
m-=1
kkk+=1
i+=m
break
if i+m==n-1:
break
if ddd==0:
print(-1)
else:
print(kkk) | if vp[i+1]-vp[i]==k: | 11 | decision |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
x(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | x(1,i,2) | 9 | statement |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n%2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | rest=pr-2*(n%2); | 11 | operation |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n%1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | for j in range(i+1,n%1): | 16 | operation |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt==m):
quit()
print(i,j,pr+3) | if(cnt==m): | 18 | decision |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n*2);
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | rest=pr-2*(n*2); | 11 | operation |
n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | n, k = map(int, input().split())
if k<1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | if k<1: | 2 | decision |
n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans==n:
break
print(ans-1) | if ans==n: | 9 | decision |
n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans==n:
break
print(ans-1) | if ans==n: | 9 | decision |
n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans==n:
break
print(ans-1) | if ans==n: | 9 | decision |
n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 1
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | n, k = map(int, input().split())
if k == 1:
print(n)
else:
ans = 99
ans = 1
for i in range(0, 100):
ans = ans*2
if ans > n:
break
print(ans-1) | ans = 99 | 5 | value |
def normalize(login):
new_login = ''
for x in login:
if x == '0':
new_login += 'o'
elif x in ['l', 'L', 'I', 'i']:
new_login += '1'
else:
new_login += x.lower()
return new_login
answer = 'Yes'
user_login = normalize(input())
logins_amount = int(input())
for i in range(logins_amount):
login = normalize(input())
if len(login) != len(user_login):
continue
if login == user_login:
answer = 'No'
print(answer) | def normalize(login):
new_login = ''
for x in login:
if x == '0':
new_login += 'o'
elif x in ['l', 'L', 'I', 'i']:
new_login += '1'
else:
new_login += x.lower()
return new_login
answer = 'Yes'
user_login = normalize(input())
logins_amount = int(input())
for i in range(logins_amount):
login = normalize(input())
if len(login) != len(user_login):
continue
if login<user_login:
answer = 'No'
print(answer) | if login<user_login: | 22 | decision |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))>>2+(r-l)) | print(min(abs(l-pos),abs(r-pos))>>2+(r-l)) | 11 | operation |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | n,pos,l,r=map(int,input().split())
if l<1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | if l<1 and r==n: | 2 | decision |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)>>1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | print(abs(l-pos)>>1) | 9 | operation |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | n,pos,l,r=map(int,input().split())
if l==1 and r<n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | if l==1 and r<n: | 2 | decision |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+1)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
else:
if l==1:
print(abs(r-pos)+7)
else:
if r==n:
print(abs(l-pos)+1)
else:
print(min(abs(l-pos),abs(r-pos))+2+(r-l)) | print(abs(r-pos)+7) | 6 | value |
import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10&6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | furthest_time_taken_friend = 10&6 - furthest_prize_friend | 18 | operation |
import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10>>6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | furthest_time_taken_friend = 10>>6 - furthest_prize_friend | 18 | operation |
import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i==500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | friend_prizes = [i for i in positions if i==500000] | 8 | decision |
import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)==0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | if len(my_prizes)==0: | 10 | decision |
import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i>500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | import sys
no_of_prizes = int(sys.stdin.readline().rstrip("\n"))
positions = sys.stdin.readline().rstrip("\n")
positions = positions.split(" ")
positions = [int(pos) for pos in positions]
my_prizes = [i for i in positions if i<=500000]
friend_prizes = [i for i in positions if i==500000]
if len(my_prizes)>0:
furthest_prize_me = max(my_prizes)
furthest_time_taken_me = furthest_prize_me-1
else:
furthest_time_taken_me = 0
if len(friend_prizes)>0:
furthest_prize_friend = min(friend_prizes)
furthest_time_taken_friend = 10**6 - furthest_prize_friend
else:
furthest_time_taken_friend = 0
print(max(furthest_time_taken_me,furthest_time_taken_friend)) | friend_prizes = [i for i in positions if i==500000] | 8 | decision |
n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]<0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | if (deg[jt]<0): | 38 | decision |
n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(y, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(y, input().split()) | 1 | statement |
n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(z(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | dp = [[0]*26 for _ in iter(z(N)) ] | 7 | statement |
n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j] > res):
res = dp[i][j]
print(res) | n, m = map(int, input().split())
st = input()
N = 300007
arr = dict()
dp = [[0]*26 for _ in iter(range(N)) ]
sub = []
deg = N * [0]
def append_ver(x, y):
if (x in arr):
arr[x].append(y)
else:
arr[x] = [y]
for i in range(m):
x, y = map(int, input().split())
append_ver(x, y)
deg[y] += 1
for j in range(1, n + 1):
if (not deg[j]):
sub.append(j)
count = 0
while (len(sub) != 0):
count += 1
temp = sub[0]
sub.pop(0)
dp[temp ][ord(st[temp-1]) - ord('a')] += 1
try:
for jt in arr[temp]:
for i in range(26):
dp[jt][i] = max(dp[jt][i], dp[temp][i])
deg[jt] -= 1
if (deg[jt]==0):
sub.append(jt)
except:
continue
if (count != n):
print("-1")
else:
res = 0
for i in range(1, n + 1):
for j in range(26):
if (dp[i][j]==res):
res = dp[i][j]
print(res) | if (dp[i][j]==res): | 48 | decision |
a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 87 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | rec[(m, n)] = f(m - 87 * n, n) | 16 | value |
a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2+n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | rec[(m, n)] = f(m - 2+n, n) | 16 | operation |
a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m<=2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | if m<=2 * n: | 15 | decision |
a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2%n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | rec[(m, n)] = f(m - 2%n, n) | 16 | operation |
a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, b)
print("{} {}".format(p, q)) | a, b = map(int, input().split())
rec = {}
def f(m, n):
if (m, n) in rec:
return rec[(m, n)]
if n == 0:
rec[(m, n)] = m, 0
return m, 0
if m == 0:
rec[(m, n)] = 0, n
return 0, n
if m >= 2 * n:
rec[(m, n)] = f(m - 2 * n, n)
return rec[(m, n)]
elif n >= 2 * m:
rec[(m, n)] = f(m, n - 2 * m)
return rec[(m, n)]
else:
rec[(m, n)] = (m, n)
return m, n
p, q = f(a, y)
print("{} {}".format(p, q)) | p, q = f(a, y) | 26 | statement |
n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge&1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| judge=judge&1 | 21 | operation |
n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
l_del=[]
for i in range(2,n|1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| for i in range(2,n|1): | 4 | operation |
n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge<=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| if judge<=3: | 24 | decision |
n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.values())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| n=int(input())
dic={}
l_del=[]
for i in range(2,n+1):
x=int(input())
dic[i]=x
if x in dic.keys():
del dic[x]
l_del.append(x)
l=list(dic.x())
l_del=list(set(l_del))
for i in l_del:
if i not in l:
l.append(i)
l.sort()
judge=0
z=1
for i in l:
if i==z:
judge=judge+1
z=i
elif i!=z:
if judge>=3:
z=i
judge=1
else:
judge=-1
break
if judge>=3:
print("YES")
else:
print("NO")
| l=list(dic.x()) | 10 | statement |
n, m = list(map(int, input().split()))
first_message_block_sized = list(map(int, input().split()))
second_message_block_sized = list(map(int, input().split()))
if len(first_message_block_sized) > len(second_message_block_sized):
first_message_block_sized, second_message_block_sized = second_message_block_sized, first_message_block_sized
tmp_first_sum = 0
tmp_second_sum = 0
result = 0
last_second_index = 0
for k in range(len(first_message_block_sized)):
tmp_first_sum += first_message_block_sized[k]
for last_second_index in range(last_second_index, len(second_message_block_sized)):
if tmp_first_sum == tmp_second_sum:
result += 1
tmp_first_sum = tmp_second_sum = 0
break
if tmp_second_sum > tmp_first_sum:
break
tmp_second_sum += second_message_block_sized[last_second_index]
if tmp_first_sum == tmp_second_sum and tmp_first_sum != 0:
result += 1
print(result) | n, m = list(map(int, input().split()))
first_message_block_sized = list(map(int, input().split()))
second_message_block_sized = list(map(int, input().split()))
if len(first_message_block_sized) > len(second_message_block_sized):
first_message_block_sized, second_message_block_sized = second_message_block_sized, first_message_block_sized
tmp_first_sum = 0
tmp_second_sum = 147
result = 0
last_second_index = 0
for k in range(len(first_message_block_sized)):
tmp_first_sum += first_message_block_sized[k]
for last_second_index in range(last_second_index, len(second_message_block_sized)):
if tmp_first_sum == tmp_second_sum:
result += 1
tmp_first_sum = tmp_second_sum = 0
break
if tmp_second_sum > tmp_first_sum:
break
tmp_second_sum += second_message_block_sized[last_second_index]
if tmp_first_sum == tmp_second_sum and tmp_first_sum != 0:
result += 1
print(result) | tmp_second_sum = 147 | 10 | value |
n, m = list(map(int, input().split()))
first_message_block_sized = list(map(int, input().split()))
second_message_block_sized = list(map(int, input().split()))
if len(first_message_block_sized) > len(second_message_block_sized):
first_message_block_sized, second_message_block_sized = second_message_block_sized, first_message_block_sized
tmp_first_sum = 0
tmp_second_sum = 0
result = 0
last_second_index = 0
for k in range(len(first_message_block_sized)):
tmp_first_sum += first_message_block_sized[k]
for last_second_index in range(last_second_index, len(second_message_block_sized)):
if tmp_first_sum == tmp_second_sum:
result += 1
tmp_first_sum = tmp_second_sum = 0
break
if tmp_second_sum > tmp_first_sum:
break
tmp_second_sum += second_message_block_sized[last_second_index]
if tmp_first_sum == tmp_second_sum and tmp_first_sum != 0:
result += 1
print(result) | n, m = list(map(int, input().split()))
first_message_block_sized = list(map(int, input().split()))
second_message_block_sized = list(map(int, input().split()))
if len(first_message_block_sized) > len(second_message_block_sized):
first_message_block_sized, second_message_block_sized = second_message_block_sized, first_message_block_sized
tmp_first_sum = 0
tmp_second_sum = 0
result = 0
last_second_index = 0
for k in range(len(first_message_block_sized)):
tmp_first_sum += first_message_block_sized[k]
for last_second_index in range(last_second_index, len(second_message_block_sized)):
if tmp_first_sum == tmp_second_sum:
result += 1
tmp_first_sum = tmp_second_sum = 0
break
if tmp_second_sum==tmp_first_sum:
break
tmp_second_sum += second_message_block_sized[last_second_index]
if tmp_first_sum == tmp_second_sum and tmp_first_sum != 0:
result += 1
print(result) | if tmp_second_sum==tmp_first_sum: | 20 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.