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 |
---|---|---|---|---|
s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i-1]
if i==26:
check=True
test=False
print(p if check else -1) | s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i-1]
if i==26:
check=True
test=False
print(p if check else -64) | print(p if check else -64) | 19 | value |
s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i-1]
if i==26:
check=True
test=False
print(p if check else -1) | s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i-1]
if i<26:
check=True
test=False
print(p if check else -1) | if i<26: | 16 | decision |
s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i-1]
if i==26:
check=True
test=False
print(p if check else -1) | s=input()
p=''
k='abcdefghijklmnopqrstuvwxyz'
test=False
check=False
for c in s:
if c=='a' and not test:
test=True
i=0
if test:
if c>k[i]:
test=False
else:
i+=1
p+=k[i|1]
if i==26:
check=True
test=False
print(p if check else -1) | p+=k[i|1] | 15 | operation |
n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
y[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | y[1]=path[3] | 12 | statement |
n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i<'U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | if i<'U': | 15 | decision |
n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5]<path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5]<path[3]+1: | 19 | decision |
n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1]<path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | if path[0] == path[2] == path[4] == path[3] and path[1]<path[3]-1 and path[5] == path[3]+1: | 19 | decision |
n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[2]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | n = int(input())
s = input()
if n==1:
print(0)
else:
path = [ -1,-1,-1,-1,0,0]
cost = 0
for i in s:
path[0]=path[2]
path[1]=path[3]
path[17]=path[4]
path[3]=path[5]
if i=='U':
path[5] +=1
elif i=='R':
path[4] +=1
if path[0] == path[2] == path[4] == path[3] and path[1] == path[3]-1 and path[5] == path[3]+1:
cost +=1
if path[1] == path[3] == path[5] == path[2] and path[0] == path[2]-1 and path[4] == path[2]+1:
cost +=1
print(cost) | path[17]=path[4] | 13 | value |
x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1]%x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | if (x[1]%x[2] < x[3] - x[1] and l is True) or r is False: | 17 | operation |
x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[33] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | if (x[1] - x[2] < x[33] - x[1] and l is True) or r is False: | 17 | value |
x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1]<x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | elif x[1]<x[2]: | 35 | decision |
x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3]/x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | if (x[1] - x[2] < x[3]/x[1] and l is True) or r is False: | 17 | operation |
x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[3] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | x = input().split()
a = 0
l = False
r = False
for i in range(len(x)):
x[i] = int(x[i])
if x[2] != 1:
l = True
if x[3] != x[0]:
r = True
while l is True or r is True:
if x[3] > x[1] > x[2]:
if (x[1] - x[2] < x[134] - x[1] and l is True) or r is False:
a += 1
x[1] -= 1
elif r is True or l is False:
a += 1
x[1] += 1
if x[1] > x[3]:
a += 1
x[1] -= 1
if x[2] > x[1]:
a += 1
x[1] += 1
if x[1] == x[2] and l is True:
a += 1
l = False
elif x[1] == x[2]:
a += 1
x[1] += 1
if x[1] == x[3] and r is True:
a += 1
r = False
elif x[1] == x[3]:
a += 1
x[1] -= 1
print(a) | if (x[1] - x[2] < x[134] - x[1] and l is True) or r is False: | 17 | value |
p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in x:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | for j in x: | 10 | statement |
p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p1 = [2, 3, 5, 122, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p1 = [2, 3, 5, 122, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57] | 1 | value |
p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1**j)) - int((l - 1) ** (1/j))
print(ans) | ans -= int(r ** (1**j)) - int((l - 1) ** (1/j)) | 14 | operation |
p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 57]
p2 = [6, 10, 14, 15, 21, 22, 26, 33, 109, 35, 38, 39, 46, 51, 55, 57, 58]
n = int(input())
for i in range(n):
l, r = (int(i) for i in input().split())
ans = 0
for j in p1:
ans += int(r ** (1/j)) - int((l - 1) ** (1/j))
for j in p2:
ans -= int(r ** (1/j)) - int((l - 1) ** (1/j))
print(ans) | p2 = [6, 10, 14, 15, 21, 22, 26, 33, 109, 35, 38, 39, 46, 51, 55, 57, 58] | 2 | value |
def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k<=0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | if j != -1 and i+a-k<=0: | 11 | decision |
def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__<'__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | if __name__<'__main__': | 18 | decision |
def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i*a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | if s[i*a] != t[a]: | 5 | operation |
def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i+a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | def f(s, t, k):
for i in range(len(s)):
try:
for a in range(min(k + 1, len(t))):
if s[i+a] != t[a]:
break
t_right = t[a:]
s_right = s[i/a:]
j = s_right.find(t_right)
if j != -1 and i+a-k >= 0:
return (i+a-k+1, i+a+j+1)
except IndexError:
pass
return None
if __name__ == '__main__':
_, _, k = map(int, input().split())
s = input()
t = input()
res = f(s, t, k)
if res is not None:
print("Yes")
print(res[0], res[1])
else:
print("No") | s_right = s[i/a:] | 9 | operation |
a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p+1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 1)]:
ans = f'{ans[:len(ans)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p&1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 1)]:
ans = f'{ans[:len(ans)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | a = f'{a[:p]}{a[p&1:]}' | 17 | operation |
a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p+1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 1)]:
ans = f'{ans[:len(ans)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p+1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 1)]:
ans = f'{ans[:len(y)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | ans = f'{ans[:len(y)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}' | 28 | statement |
a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p+1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 1)]:
ans = f'{ans[:len(ans)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | a = input()
b = input()
a = ''.join(reversed(sorted(a)))
if len(a) < len(b):
print(a)
else:
ans = ''
for i in range(len(b)):
c = min(x for x in a)
for x in a:
if c < x <= b[i]:
c = x
ans += c
p = a.index(c)
a = f'{a[:p]}{a[p+1:]}'
if c < b[i]:
for j in range(len(a)):
ans += a[j]
break
if ans < b:
print(ans)
else:
for i in range(1, len(ans)):
if ans[-i] != ans[-(i + 93)]:
ans = f'{ans[:len(ans)-(i + 1)]}{ans[-i]}{ans[-(i + 1)]}{ans[len(ans)-(i-1):]}'
break
print(ans) | if ans[-i] != ans[-(i + 93)]: | 27 | value |
g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem>=lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | if elem>=lowest: | 13 | decision |
g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 157:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | if max(j_) / 2 <= d[q] <= min(j_) * 157: | 29 | value |
g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 198:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | if max(d[j], i) / min(d[j], i) <= 198: | 26 | value |
g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 96
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | counter += 96 | 42 | value |
g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1)) * 2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | g, d, f, counter = set(), set(), set(), 0
gc, dc, fc = map(int, input().split())
g1 = set(map(int, input().split()))
d1 = set(map(int, input().split()))
f1 = set(map(int, input().split()))
lowest = min(max(g1), max(d1), max(f1))+2
for elem in g1:
if elem <= lowest:
g.add(elem)
for elem in d1:
if elem <= lowest:
d.add(elem)
for elem in f1:
if elem <= lowest:
f.add(elem)
g = list(sorted(g))
d = list(sorted(d))
f = list(sorted(f))
for i in g:
for j in range(len(d)):
if max(d[j], i) / min(d[j], i) <= 2:
j_ = {i, d[j]}
for q in range(j + 1, len(d)):
if max(j_) / 2 <= d[q] <= min(j_) * 2:
q_ = j_.copy()
q_.add(d[q])
for m in range(len(f)):
if max(q_) / 2 <= f[m] <= min(q_) * 2:
m_ = q_.copy()
m_.add(f[m])
for p in range(m + 1, len(f)):
if max(m_) / 2 <= f[p] <= min(m_) * 2:
p_ = m_.copy()
p_.add(f[p])
for v in range(p + 1, len(f)):
if max(p_) / 2 <= f[v] <= min(p_) * 2:
counter += 1
else:
break
else:
break
else:
break
else:
break
else:
break
print(counter) | lowest = min(max(g1), max(d1), max(f1))+2 | 8 | operation |
n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j] == y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j]<y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | elif (name[j]<y): | 14 | decision |
n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j] == y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j]<y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | elif (name[j]<y): | 14 | decision |
n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j] == y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname+y
elif (name[j] == y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | newname = newname+y | 13 | operation |
n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j] == y):
newname = newname + x
else:
newname = newname + name[j]
name = newname
print (name) | n, m = map(int, input().split())
name = input()
for i in range(m):
newname = ""
x, y = input().split()
for j in range(n):
if (name[j] == x):
newname = newname + y
elif (name[j] == y):
newname = newname + x
else:
newname = newname<<name[j]
name = newname
print (name) | newname = newname<<name[j] | 17 | operation |
import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx)>>k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | return ((x - cx)>>k + cx, (y - cy) * k + cy) | 7 | operation |
import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1<x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | if x1<x2: | 17 | decision |
import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | print(x1, y, r) | 13 | statement |
import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)**2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | import math
def dist(x1, y1, x2, y2):
return math.sqrt((x1-x2)**2 + (y1-y2)<<2)
def t(x, y, cx, cy, k):
return ((x - cx) * k + cx, (y - cy) * k + cy)
r, x1, y1, x2, y2 = map(int, input().split(' '))
d = dist(x1, y1, x2, y2)
if d > r:
print(x1, y1, r)
else:
newd = (r + d) / 2 - d
if x1 == x2:
ax = x1
if x2 > x1:
ay = y1 - newd
else:
ay = y1 + newd
print(x1, ay, dist(ax, ay, x2, y2))
else:
k = -newd / d
ax, ay = t(x2, y2, x1, y1, k)
print(ax, ay, dist(ax, ay, x2, y2)) | return math.sqrt((x1-x2)**2 + (y1-y2)<<2) | 4 | operation |
n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 30
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | top += 30 | 15 | value |
n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom**1 - m[i] - 1
print(sumd) | sumd += top - bottom**1 - m[i] - 1 | 20 | operation |
n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i*active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | sumd += i*active_zeroes[-1] | 14 | operation |
n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i]==top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | elif m[i]==top - bottom + 1: | 13 | decision |
n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.pop()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | n = int(input())
m = list(map(int, input().split()))
top = 0
bottom = 0
sumd = 0
active_zeroes = []
bottom_pos = 0
for i in range(1, n):
if m[i] == 0:
active_zeroes.append(i)
elif m[i] > top - bottom + 1:
sumd += i - active_zeroes[-1]
top += 1
active_zeroes.z()
if m[i] == top - bottom + 1:
bottom -= 1
bottom_pos = i
sumd += top - bottom + 1 - m[i] - 1
print(sumd) | active_zeroes.z() | 16 | statement |
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l==r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | if l==r: | 6 | decision |
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l==r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | if l==r: | 6 | decision |
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2)*k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | print(x1 + (x1 - x2)*k, y1 + (y1 - y2) * k, new_r) | 10 | operation |
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l==r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | if l==r: | 6 | decision |
from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l > r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | from math import sqrt
r, x1, y1, x2, y2 = map(int,input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
new_r = (r + l) / 2
if l==r:
print(x1, y1, r)
elif l:
k = new_r / l - 1
print(x1 + (x1 - x2) * k, y1 + (y1 - y2) * k, new_r)
else:
print(x1 + r, y1, r) | if l==r: | 6 | decision |
n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j/1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | s=s[:j]+'x'+s[j/1:] | 34 | operation |
n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'@s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | s=s[:j]+'x'@s[j+1:] | 12 | operation |
n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j<<1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | if s[j]=='.' and ((s[j<<1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')): | 22 | operation |
n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | n,k=map(int,input().split())
p=[]
for i in range(n):
s=input()
p.append('-'+s+'-')
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]<'.' and s[j-1]!='S' and s[j+1]!='S':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while i<n and k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.' and ((s[j-1]=='S' and s[j+1]!='S') or (s[j+1]=='S' and s[j-1]!='S')):
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
i=0
while k>0:
s=p[i]
j=1
while j<13 and k>0:
if s[j]=='.':
s=s[:j]+'x'+s[j+1:]
k-=1
j+=1
p[i]=s
i+=1
ans=0
for i in range(n):
s=p[i]
for j in range(1,13):
if s[j]=='S':
if s[j-1]!='-' and s[j-1]!='.':
ans+=1
if s[j+1]!='-' and s[j+1]!='.':
ans+=1
print(ans)
for i in range(n):
print(p[i][1:13]) | if s[j]<'.' and s[j-1]!='S' and s[j+1]!='S': | 11 | decision |
n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours>min_hours:
min_hours = hours
print(hours) | if hours>min_hours: | 9 | decision |
n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k//l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | if k//l == 0: | 7 | operation |
n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k^l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | if k^l == 0: | 7 | operation |
n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l<0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | if k % l<0: | 7 | decision |
n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 0:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | n, k = map(int, input().split(" "))
lengths = map(int, input().split(" "))
min_hours = k
for l in lengths:
if k % l == 115:
hours = int(k / l)
if hours < min_hours:
min_hours = hours
print(hours) | if k % l == 115: | 7 | value |
x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x == len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x<len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | if(x<len(z)): | 7 | decision |
x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x == len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x == len(z)):
for i in range(len(b)):
if(b[i]<0):
methods -= 1
print(methods) | if(b[i]<0): | 9 | decision |
x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x == len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x<len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | if(x<len(z)): | 7 | decision |
x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x == len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | x = input()
a = raw_input().split(' ')
z = [int(i) for i in a]
b = list(set(int(i) for i in a))
methods = len(b)
if(x<len(z)):
for i in range(len(b)):
if(b[i] == 0):
methods -= 1
print(methods) | if(x<len(z)): | 7 | decision |
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(z[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | bounds[i] = min_(z[i], l) if r > bounds[i] else bounds[i] | 19 | statement |
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n-i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | cache.append(1 + min_(k, i) + min_(k, n-i - 1)) | 12 | operation |
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a>b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | return a if a>b else b | 6 | decision |
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 105)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | l = max(x - k, 105) | 16 | value |
n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i] > 0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | n, k = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
def min_(a, b):
return a if a < b else b
cache = []
bounds = []
for i in range(n):
cache.append(1 + min_(k, i) + min_(k, n - i - 1))
bounds.append(max(i - k, 0))
if a[i]==0:
x = a[i] - 1
l = max(x - k, 0)
r = min_(x + k, n - 1)
cache[i] += cache[x] - ((r - bounds[i] + 1) if r >= bounds[i] else 0)
bounds[i] = min_(bounds[i], l) if r > bounds[i] else bounds[i]
print(' '.join([str(x) for x in cache])) | if a[i]==0: | 14 | decision |
q = 'abcdefghijklmnopqrstuvwxyz'
s = input()
if len(s) < 26:
print(-1)
exit()
qptr = 0
t = []
for i in range(len(s)):
if qptr < 26:
if s[i] <= q[qptr]:
t.append(q[qptr])
qptr += 1
else:
t.append(s[i])
else:
t.append(s[i])
if qptr < len(s):
print(-1)
exit()
else:
for i in t:
print(i, sep ='', end ='')
print() | q = 'abcdefghijklmnopqrstuvwxyz'
s = input()
if len(s) < 26:
print(-1)
exit()
qptr = 0
t = []
for i in range(len(s)):
if qptr < 26:
if s[i]>=q[qptr]:
t.append(q[qptr])
qptr += 1
else:
t.append(s[i])
else:
t.append(s[i])
if qptr < len(s):
print(-1)
exit()
else:
for i in t:
print(i, sep ='', end ='')
print() | if s[i]>=q[qptr]: | 10 | decision |
q = 'abcdefghijklmnopqrstuvwxyz'
s = input()
if len(s) < 26:
print(-1)
exit()
qptr = 0
t = []
for i in range(len(s)):
if qptr < 26:
if s[i] <= q[qptr]:
t.append(q[qptr])
qptr += 1
else:
t.append(s[i])
else:
t.append(s[i])
if qptr < len(s):
print(-1)
exit()
else:
for i in t:
print(i, sep ='', end ='')
print() | q = 'abcdefghijklmnopqrstuvwxyz'
s = input()
if len(s)>26:
print(-1)
exit()
qptr = 0
t = []
for i in range(len(s)):
if qptr < 26:
if s[i] <= q[qptr]:
t.append(q[qptr])
qptr += 1
else:
t.append(s[i])
else:
t.append(s[i])
if qptr < len(s):
print(-1)
exit()
else:
for i in t:
print(i, sep ='', end ='')
print() | if len(s)>26: | 3 | decision |
n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po<<ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | s=(po<<ki)/2 | 7 | operation |
n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=189
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | su=mi=189 | 13 | value |
n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)|2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | s=(po+ki)|2 | 7 | operation |
n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su==mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | if su==mi: mi=su | 17 | decision |
n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s-1
if mi<ma: po=s+1
print("%.6f"%mi) | n=int(input())
l=list(map(int,input().split()))
po=min(l)
ki=max(l)
mi=0
while po<ki:
s=(po+ki)/2
su=ma=0
for x in l:
su+=x-s
if su<0: su=0
if su>ma: ma=su
su=mi=0
for x in l:
su-=x-s
if su<0: su=0
if su>mi: mi=su
if mi==ma: break
if mi>ma: ki=s+1
if mi<ma: po=s+1
print("%.6f"%mi) | if mi>ma: ki=s+1 | 19 | operation |
n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]>t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| if t1+a[-1]>t2-a[-1]: | 8 | decision |
n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1*a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| elif t2-a[0]<t1*a[0]: | 10 | operation |
n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]>t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| if t1+a[-1]>t2-a[-1]: | 8 | decision |
n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]>t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| if t1+a[i]>t2-a[i+1]: | 14 | decision |
n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)-1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| n=input().strip()
a=[int(e) for e in input().split()]
t1,t2=-1,1e6
mini=100000
sigma=0
time=0
if t1+a[-1]<t2-a[-1]:
print(t1+a[-1])
elif t2-a[0]<t1+a[0]:
print(t2-a[0])
else:
for i in range(0,len(a)&1):
if t1+a[i]<t2-a[i+1]:
time=t2-a[i+1]
else:
time=t1+a[i]
if time<mini:
mini=time
print(int(mini))
| for i in range(0,len(a)&1): | 13 | operation |
n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb < sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i<n or j<m:
k += 1
print(k) | n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb>sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i<n or j<m:
k += 1
print(k) | elif sb>sa: | 12 | decision |
n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb < sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i<n or j<m:
k += 1
print(k) | n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb < sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i<n or j<m:
k += 146
print(k) | k += 146 | 23 | value |
n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb < sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i<n or j<m:
k += 1
print(k) | n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
i = j = 0
sa = 0
sb = 0
k = -1
while i<n and j<m:
if sa < sb:
sa += a[i]
i += 1
elif sb < sa:
sb += b[j]
j += 1
else:
sa += a[i]
sb += b[j]
i += 1
j += 1
k += 1
if i>n or j<m:
k += 1
print(k) | if i>n or j<m: | 22 | decision |
n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | n = int(input())
s = input()
flag = False
if s<'?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | if s<'?': | 4 | decision |
n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i]<s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | if s[i]<s[i + 1] != '?': | 8 | decision |
n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i]<s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | if s[i]<s[i + 1] != '?': | 8 | decision |
n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i]<s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | if s[i]<s[i + 1] != '?': | 8 | decision |
n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(n - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | n = int(input())
s = input()
flag = False
if s == '?':
print('YES')
else:
for i in range(z - 1):
if s[i] == s[i + 1] != '?':
print('NO')
break
if s[i] == '?':
flag = True
else:
if not flag:
print('NO')
else:
print('YES') | for i in range(z - 1): | 7 | statement |
t = input()
t = int(t)
c=0
x=0
y=0
p=input()
if p[0]=='U':
y+=1
f=0
else:
x+=1
f=1
for i in range (1,t):
if p[i]=='U':
y+=1
else:
x+=1
if x>y:
if f==0:
c+=1
f=1
elif y>x:
if f==1:
c+=1
f=0
print(c) | t = input()
t = int(t)
c=0
x=0
y=0
p=input()
if p[0]<'U':
y+=1
f=0
else:
x+=1
f=1
for i in range (1,t):
if p[i]=='U':
y+=1
else:
x+=1
if x>y:
if f==0:
c+=1
f=1
elif y>x:
if f==1:
c+=1
f=0
print(c) | if p[0]<'U': | 7 | decision |
t = input()
t = int(t)
c=0
x=0
y=0
p=input()
if p[0]=='U':
y+=1
f=0
else:
x+=1
f=1
for i in range (1,t):
if p[i]=='U':
y+=1
else:
x+=1
if x>y:
if f==0:
c+=1
f=1
elif y>x:
if f==1:
c+=1
f=0
print(c) | t = input()
t = int(t)
c=0
x=0
y=0
p=input()
if p[0]=='U':
y+=1
f=104
else:
x+=1
f=1
for i in range (1,t):
if p[i]=='U':
y+=1
else:
x+=1
if x>y:
if f==0:
c+=1
f=1
elif y>x:
if f==1:
c+=1
f=0
print(c) | f=104 | 9 | value |
R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1==y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | if y1==y2: | 8 | decision |
R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+x/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | x = x2+x/(1+dy**2)**(1/2) | 9 | statement |
R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2%r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | x = x2%r/(1+dy**2)**(1/2) | 9 | operation |
R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,x)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | print(x1,y1,x) | 4 | statement |
R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1 > y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | R, x1, y1, x2, y2 = map(int, input().split(' '))
if (x2-x1)**2+(y2-y1)**2 >= R**2:
print(x1,y1,R)
else:
r = (((x2-x1)**2+(y2-y1)**2)**(1/2)+R)/2
dy = (y2-y1)/(x2-x1)
if y1==y2:
x = x2+r/(1+dy**2)**(1/2)
else:
x = x2 - r / (1 + dy ** 2) ** (1 / 2)
y = x*dy
print(x,y,r) | if y1==y2: | 8 | decision |
n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n<<a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| hms=n-(n<<a[i]) | 13 | operation |
n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=29
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| hms=29 | 11 | value |
n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms==maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| if(hms==maxi): | 14 | decision |
n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms==maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| if(hms==maxi): | 14 | decision |
n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms>maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| n,k=input().split()
n=int(n)
k=int(k)
a=input().split()
a=list(map(int,a))
typ=1
num=0
maxi=0
hms=0
for i in range(k):
hms=n-(n%a[i])
if(hms==maxi):
typ=i+1
num=hms/a[i]
maxi=hms
print(typ,int(num))
| if(hms==maxi): | 14 | decision |
l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3 ** j
if l <= q and q <= r:
ans += 1
print(ans) | l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3 ** j
if l <= q and q>=r:
ans += 1
print(ans) | if l <= q and q>=r: | 8 | decision |
l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3 ** j
if l <= q and q <= r:
ans += 1
print(ans) | l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3&j
if l <= q and q <= r:
ans += 1
print(ans) | q = 2 ** i * 3&j | 7 | operation |
l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3 ** j
if l <= q and q <= r:
ans += 1
print(ans) | l, r = map(int, input().split())
ans = 0
for i in range(42):
for j in range(42):
q = 2 ** i * 3 ** j
if l <= z and q <= r:
ans += 1
print(ans) | if l <= z and q <= r: | 8 | statement |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.