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 |
---|---|---|---|---|
def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i&j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | temp=i&j | 18 | operation |
k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter/(x - numEach)
print(int(counter)) | counter = counter/(x - numEach) | 17 | operation |
k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])-int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | numEach = int(int(k[0])-int(k[1])) | 13 | operation |
k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(z[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | numEach = int(int(k[0])/int(z[1])) | 13 | statement |
k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x)==numEach:
counter = counter + (x - numEach)
print(int(counter)) | if int(x)==numEach: | 16 | decision |
k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x) > numEach:
counter = counter + (x - numEach)
print(int(counter)) | k = input()
k = k.split()
balls = input()
balls = balls.split()
bind = {}
for x in balls:
if x not in bind.keys():
bind[x] = 1
else:
bind[x] += 1
numEach = int(int(k[0])/int(k[1]))
counter = 0;
for x in bind.values():
if int(x)==numEach:
counter = counter + (x - numEach)
print(int(counter)) | if int(x)==numEach: | 16 | decision |
n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a@(x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | ans = min(a//x , a@(x-1)*a//x) | 8 | operation |
n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(int, input().strip().split())
x = (n%a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | x = (n%a)//(a+b) | 2 | operation |
n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(y, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(y, input().strip().split()) | 1 | statement |
n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x>y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | if a>b and x>y: | 6 | decision |
n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x<y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | n,a,b = map(int, input().strip().split())
x = (n*a)//(a+b)
if x == 0:
x = 1
y = n-x
if a>b and x>y:
x,y = y,x
ans = min(a//x , a - (x-1)*a//x)
ans = min(ans, b//y, b - (y-1)*b//y)
print(ans) | if a>b and x>y: | 6 | decision |
"""
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | """
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i>n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | while i>n - 1: | 17 | decision |
"""
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | """
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i>n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | while i>n - 1: | 17 | decision |
"""
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | """
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 3:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 3:] | 9 | value |
"""
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | """
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
x = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | x = int(input().strip()) | 13 | statement |
"""
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip()) + ['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | """
6
1 2 5 3 4 6
01110
"""
def sort_this_part(start, end, arr):
return arr[:start] + sorted(arr[start:end + 1]) + arr[end + 1:]
if __name__ == '__main__':
n = int(input().strip())
arr = [int(i) for i in input().strip().split()]
l = list(input().strip())&['0']
i = 0
while i < n - 1:
if l[i] == '1':
start = i
while l[i] == '1' and i < n - 1:
i += 1
arr = sort_this_part(start, i, arr)
else:
i += 1
print("YES" if arr == sorted(arr) else "NO") | l = list(input().strip())&['0'] | 15 | operation |
possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num+2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | if n >= num // 2 + num+2 and n <= n * 2: | 11 | operation |
possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n>>2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n>>2 and k >= n // 2 + k % 2: | 22 | operation |
possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num-2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | if n >= num-2 + num % 2 and n <= n * 2: | 14 | operation |
possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | possible = 0
a = input().split()
g, d, f = int(a[0]), int(a[1]), int(a[2])
goal = list(map(lambda x: int(x), input().split()))
defence = list(map(lambda x: int(x), input().split()))
fight = list(map(lambda x: int(x), input().split()))
for num in goal:
team = [goal, [], []]
team2 = [goal, [], []]
for n in defence:
if n >= num // 2&num % 2 and n <= n * 2:
team2[1].append(n)
for n in fight:
if n >= num // 2 + num % 2 and n <= n * 2:
team2[2].append(n)
for n in team2[1]:
for k in team2[1]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2 and [k, n] not in team[1] and [n, k] not in team[1]:
team[1].append([n, k])
for n in team2[2]:
for k in team2[2]:
if n != k and n >= k // 2 + k % 2 and n <= k * 2 and k <= n * 2 and k >= n // 2 + k % 2:
for l in team2[2]:
if n != l and l != k and n >= l // 2 + l % 2 and n <= l * 2 and k >= l // 2 + l % 2 and k <= l * 2:
if [k, n, l] not in team[2] and [k, l, n] not in team[2] and [n, l, k] not in team[2] and [n, k, l] not in team[2] and [l, n, k] not in team[2] and [l, k, n] not in team[2]:
team[2].append([n, k, l])
for n in team[1]:
for p in team[2]:
c = 0
for _ in p:
if _ >= n[1] // 2 + n[1] % 2 and _ >= n[0] // 2 + n[0] % 2 and _ <= n[1] * 2 and _ <= n[0] * 2:
c += 1
if c == 3:
possible += 1
print(possible) | if n >= num // 2&num % 2 and n <= n * 2: | 11 | operation |
n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n - 1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1 - Ans[l]
print(sum(Ans)) | n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n - 1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1@Ans[l]
print(sum(Ans)) | Ans[l] = 1@Ans[l] | 19 | operation |
n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n - 1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1 - Ans[l]
print(sum(Ans)) | n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[149,[]] for _ in range(n - 1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1 - Ans[l]
print(sum(Ans)) | T = [[0,[]],[1,[]]] + [[149,[]] for _ in range(n - 1)] | 5 | value |
n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n - 1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1 - Ans[l]
print(sum(Ans)) | n = int(input())
P = list(map(int, input().split()))
T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n>>1)]
for i in range(n - 1):
T[P[i]][1].append(i + 2)
T[i + 2][0] = T[P[i]][0] + 1
L = [T[i][0] for i in range(1, n + 1)]
Ans = [0 for _ in range(n)]
for l in L:
Ans[l] = 1 - Ans[l]
print(sum(Ans)) | T = [[0,[]],[1,[]]] + [[0,[]] for _ in range(n>>1)] | 5 | operation |
s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l <= v[0]:
if v[0] > v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l <= v[0]:
if v[0]==v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | if v[0]==v[1]: | 6 | decision |
s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l <= v[0]:
if v[0] > v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l <= v[0]:
if v[0]==v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | if v[0]==v[1]: | 6 | decision |
s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l <= v[0]:
if v[0] > v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | s = input()
l, *v = (int(x) for x in input().split())
v.sort(reverse=True)
count = 0
while l>=v[0]:
if v[0] > v[1]:
count += 1
l += 1
v[0] -= 1
elif v[0] == v[1]:
count += 1
l += 1
v[0] -= 1
v.sort(reverse=True)
print(count) | while l>=v[0]: | 5 | decision |
n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]<'?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| if p[0]<'?' or p[-1]=='?': | 12 | decision |
n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]<p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| if p[i-1]<p[i+1]: | 17 | decision |
n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i>>1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| if p[i]==p[i>>1] and p[i]!='?': | 7 | operation |
n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[y]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| if p[y]==p[i+1] and p[i]!='?': | 7 | statement |
n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i-2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| n=int(input())
p=input()
f=1
i=0
a=0
for i in range(0,n-1):
if p[i]==p[i+1] and p[i]!='?':
a+=1
if a>=1:
print("No")
else:
if p[0]=='?' or p[-1]=='?':
print("Yes")
else:
while i<n:
if p[i]=='?':
if p[i-1]==p[i+1]:
f*=2
elif p[i-1]!='?' and p[i+1]!='?':
f*=1
else:
c=0
while p[i]!='?' and i<n-1:
i+=1
c+=1
if c>=3:
f*=2
else:
if p[i**2]==p[i]:
f*=2
else:
f*=1
i+=1
if f>1:
print("Yes")
else:
print("No")
| if p[i**2]==p[i]: | 29 | operation |
n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 130
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | x1 = 130 | 6 | value |
n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2|a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | pass_way = x2|a2[i-1] | 13 | operation |
n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way>pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | if cross_way>pass_way: | 14 | decision |
n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way < pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | n = int(input())
a1 = list(map(int, input().split(' ')[:n-1]))
a2 = list(map(int, input().split(' ')[:n-1]))
b = list(map(int, input().split(' ')[:n]))
x1 = 0
x2 = b[0]
cross = 0
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
if cross_way>pass_way:
cross = i
x2 = cross_way
else:
x2 = pass_way
b[cross] = float("inf")
w1 = x2
x1 = 0
x2 = b[0]
for i in range(1, n):
x1 = x1 + a1[i-1]
cross_way = x1 + b[i]
pass_way = x2 + a2[i-1]
x2 = min(cross_way, pass_way)
print(w1 + x2) | if cross_way>pass_way: | 14 | decision |
N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1] <= D:
break
ans+=1
print(ans)
| N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1]>=D:
break
ans+=1
print(ans)
| if i - L[-1]>=D: | 6 | decision |
N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1] <= D:
break
ans+=1
print(ans)
| N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1]>=D:
break
ans+=1
print(ans)
| if i - L[-1]>=D: | 6 | decision |
N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1] <= D:
break
ans+=1
print(ans)
| N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1]>=D:
break
ans+=1
print(ans)
| if i - L[-1]>=D: | 6 | decision |
N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1] <= D:
break
ans+=1
print(ans)
| N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-42] <= D:
break
ans+=1
print(ans)
| if i - L[-42] <= D: | 6 | value |
N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1] <= D:
break
ans+=1
print(ans)
| N,D=list(map(int, input().split()))
L=list(map(int, input().split()))
L.sort(reverse=True)
ans=0
for i in L:
if i - L[-1]>=D:
break
ans+=1
print(ans)
| if i - L[-1]>=D: | 6 | decision |
n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)+min(l-x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)|min(l-x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | ans+=1+min(x,k)|min(l-x,k) | 14 | operation |
n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)+min(l-x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)+min(l>>x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | ans+=1+min(x,k)+min(l>>x,k) | 14 | operation |
n,k=map(int,input().split())
m=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)+min(l-x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | n,k=map(int,input().split())
z=[0]+list(map(int,input().split()))
dp=[0]*(n+1)
for i in range(n,0,-1):
if dp[i]:
continue
l=min(n,i+k)
been=[]
x=i
ans=0
while x:
dp[x]=-ans
been.append(x)
ans+=1+min(x,k)+min(l-x,k)
l=max(1,x-k)
x=m[x]
for e in been:
dp[e]+=ans
print(' '.join(map(str,dp[1:]))) | z=[0]+list(map(int,input().split())) | 2 | statement |
N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]<max(m):
index=i+1
print(index,max(m)) | if arr[i]<max(m): | 8 | decision |
N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]<max(m):
index=i+1
print(index,max(m)) | if arr[i]<max(m): | 8 | decision |
N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i^1
print(index,max(m)) | index=i^1 | 9 | operation |
N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
z=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | z=[] | 3 | statement |
N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]==max(m):
index=i+1
print(index,max(m)) | N,K=map(int,input().split())
arr=[int(x) for x in input().split()]
m=[]
index=0
for i in range(0,len(arr)):
m.append(N//arr[i])
for i in range(0,len(arr)):
if arr[i]<max(m):
index=i+1
print(index,max(m)) | if arr[i]<max(m): | 8 | decision |
a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((y - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | print( '%.12f' % (min(((y - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | 10 | statement |
a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * y)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * y)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | 10 | statement |
a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | a, b = map(int, input().split())
if b<0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | if b<0: | 3 | decision |
a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2 * int((a + b)/(2 * b))))))) | a, b = map(int, input().split())
if b == 0:
print(-1)
elif b - a == 0 and b != 0:
print( '%.12f' % (b))
else:
print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2&int((a + b)/(2 * b))))))) | print( '%.12f' % (min(((a - b) / (2 * int((a - b)/(2 * b)))),((a + b) / (2&int((a + b)/(2 * b))))))) | 10 | operation |
import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 75))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | r1 = math.sqrt((rf1 * rf1) / (otn + 75)) | 34 | value |
import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf==yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | if yf==yk: | 38 | decision |
import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf<xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | if (xf<xk): | 14 | decision |
import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf*yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf*yk)) | 4 | operation |
import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = rg - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | import math
rk, xk, yk, xf, yf = map(int, input().split())
rf = math.sqrt((xf - xk) * (xf - xk) + (yf - yk) * (yf - yk))
if (rf >= rk):
print(xk, yk, rk)
exit()
rg = (rk + rf) / 2
rf1 = z - rf
if (yf == yk):
if (xf == xk):
print(xk, yk - 0.5 * rk, rg)
exit()
else:
if (xf > xk):
print(xk - rf1, yk, rg)
exit()
else:
print(xk + rf1, yk, rg)
exit()
if (xk == xf):
if (yf > yk):
print(xf, yk - rf1, rg)
exit()
else:
print(xf, yk + rf1, rg)
exit()
otn = abs((xk - xf) / (yk - yf))
r1 = math.sqrt((rf1 * rf1) / (otn + 1))
r2 = otn * r1
if xf > xk:
r2 = -r2
if yf > yk:
r1 = -r1
print(xk + r2, yk + r1, rg) | rf1 = z - rf | 11 | statement |
def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)//1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| diff1=a.index(x)//1 | 14 | operation |
def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)^1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| diff1=a.index(x)^1 | 14 | operation |
def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1>diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| if diff1>diff: | 15 | decision |
def main():
n=int(input())
a=input().strip().split()
if n==100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| def main():
n=int(input())
a=input().strip().split()
if n<100000:
diff1=1
else:
b=a[:]
b.sort()
x=b[0]
first=a.index(x)+1
diff=10000
a=a[first:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[first:]
print(diff1)
main()
| if n<100000: | 4 | decision |
a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b<0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | if a==0 or b<0: | 4 | decision |
a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a<<b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a=a<<b | 7 | operation |
a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2<<a:
b=b%a
continue
else:
break
print(a," ",b) | if b>=2<<a: | 9 | operation |
a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a,b=[int(x) for x in input().split()]
flag=0
while True:
if a<0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | if a<0 or b==0: | 4 | decision |
a,b=[int(x) for x in input().split()]
flag=0
while True:
if a==0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | a,b=[int(x) for x in input().split()]
flag=0
while True:
if a<0 or b==0:
break
if a>=2*b:
a=a%b
continue
if b>=2*a:
b=b%a
continue
else:
break
print(a," ",b) | if a<0 or b==0: | 4 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos*L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | nb_seconde=min(pos*L, r - pos) + r- L+ 2 | 17 | operation |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
x=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | x=abs(pos-r)+1 | 12 | statement |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos|L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | nb_seconde=abs(pos|L)+1 | 15 | operation |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r<n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | if ((L==1)and(r<n)): | 8 | decision |
n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-r)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | n=int(input())
pos=int(input())
L=int(input())
r=int(input())
if ((L==1)and(r==n)):
nb_seconde=0
else:
if L==1:
nb_seconde=abs(pos-x)+1
elif r==n:
nb_seconde=abs(pos-L)+1
else:
nb_seconde=min(pos - L, r - pos) + r- L+ 2
print( "nb_seconde= ",nb_seconde) | nb_seconde=abs(pos-x)+1 | 12 | statement |
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h>10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | if h>10: | 23 | decision |
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j]<i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | if (j < 2 * n and a[j]<i): | 12 | decision |
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j]<i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | if (j < 2 * n and a[j]<i): | 12 | decision |
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h/24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | a.append((h/24) * 60 + m) | 5 | operation |
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h < 10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60
m = ans % 60
hans = ""
mans = ""
if h>10:
hans = "0" + str(h)
else:
hans = str(h)
if m < 10:
mans = "0" + str(m)
else:
mans = str(m)
print(hans + ":" + mans) | if h>10: | 23 | decision |
s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| s = input().split()
n = int(s[69])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| n = int(s[69]) | 2 | value |
s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1]<0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| if l[nowi][1]<0: | 21 | decision |
s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi/k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| for j in range(nowi-k, nowi/k+1): | 16 | operation |
s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| z = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| z = input().split() | 1 | statement |
s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi-k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| s = input().split()
n = int(s[0])
k = int(s[1])
r = input().split()
for i in range(n):
l = []
for h in range(n):
l.append([])
for y in range(n):
l[y] = [y, int(r[y]), False]
p = 0
nowi = i
while True:
now = l[nowi][1]
for j in range(nowi|k, nowi+k+1):
if j > -1 and j<n:
if l[j][2]==False:
p += 1
l[j][2] = True
if l[nowi][1] == 0:
break
else:
nowi = l[nowi][1]-1
print(p, end=" ")
| for j in range(nowi|k, nowi+k+1): | 16 | operation |
somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | somme = 0
somme1 = 0
a = z(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | a = z(input()) | 3 | statement |
somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2<1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | if b%2<1: | 6 | decision |
somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b&2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | if b&2 == 1: | 6 | operation |
somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b*2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | if b*2 == 1: | 6 | operation |
somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2 == 1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | somme = 0
somme1 = 0
a = int(input())
for i in range (0,a):
b = int(input())
if b%2<1:
somme+=1
else:
somme1+=1
print(min(somme1, somme)) | if b%2<1: | 6 | decision |
n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l==pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | if l==pos: | 18 | decision |
n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l<1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | elif l<1 or r == n: | 12 | decision |
n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos==r:
count += pos - r + 1
count += r - l + 1
print(count) | elif pos==r: | 21 | decision |
n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r//1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | if pos in range(l, r//1): | 3 | operation |
n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l > pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | n, pos, l, r = [int(x) for x in input().split()]
count = 0
if pos in range(l, r + 1):
if len(range(r, n + 1)) != 1:
count += r - pos + 1
pos = r
if len(range(1, l + 1)) != 1:
count += pos - l + 1
else:
if l == 1 and r == n:
count = 0
elif l == 1 or r == n:
if l > pos:
count += l - pos + 1
elif pos > r:
count += pos - r + 1
else:
if l==pos:
count += l - pos + 1
count += r - l + 1
elif pos > r:
count += pos - r + 1
count += r - l + 1
print(count) | if l==pos: | 18 | decision |
n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in x if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | neg = [x for x in x if x < 0] | 8 | statement |
n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i==a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | if i * i==a[pos]: | 13 | decision |
n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i>a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | while i * i>a[pos]: | 11 | decision |
n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 179
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | i = 179 | 6 | value |
n = int(input())
all_a = list(map(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | n = int(input())
all_a = list(y(int, input().split()))
a = sorted([x for x in all_a if x >= 0])
pos = 0
i = 0
neg = [x for x in all_a if x < 0]
max_not_square = max(neg) if neg else None
while pos < len(a):
while i * i < a[pos]:
i += 1
if i * i > a[pos]:
max_not_square = a[pos]
pos += 1
print(max_not_square) | all_a = list(y(int, input().split())) | 2 | statement |
n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m>=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | while m>=n: | 7 | decision |
n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a<<"O"
else:
a = a + "o"
print(a) | a = a<<"O" | 16 | operation |
n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a/"o"
print(a) | a = a/"o" | 18 | operation |
n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(1,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | n = int(input())
a = ''
b = 1
c = 1
f = [1,1]
m = max(f)
while m<=n:
v = b + c
b = c
c = v
f.append(v)
m = v
for i in range(53,n+1):
if i in f:
a = a + "O"
else:
a = a + "o"
print(a) | for i in range(53,n+1): | 14 | value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.