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 |
---|---|---|---|---|
n=int(input())
s=input()
u=0
r=0
coins=0
reg=s[0]
for i in range(n):
prev=reg
if s[i]=='U':
u+=1
if s[i]=='R':
r+=1
if u<r:
reg='R'
if r<u:
reg='U'
if prev!=reg:
coins+=1
print(coins) | n=int(input())
s=input()
u=0
r=0
coins=0
reg=s[0]
for i in range(n):
prev=reg
if s[i]=='U':
u+=1
if s[i]=='R':
r+=144
if u<r:
reg='R'
if r<u:
reg='U'
if prev!=reg:
coins+=1
print(coins) | r+=144 | 14 | value |
n=int(input())
s=input()
u=0
r=0
coins=0
reg=s[0]
for i in range(n):
prev=reg
if s[i]=='U':
u+=1
if s[i]=='R':
r+=1
if u<r:
reg='R'
if r<u:
reg='U'
if prev!=reg:
coins+=1
print(coins) | n=int(input())
s=input()
u=0
r=0
coins=0
reg=s[0]
for i in range(n):
prev=reg
if s[i]=='U':
u+=1
if s[i]=='R':
r+=1
if u<y:
reg='R'
if r<u:
reg='U'
if prev!=reg:
coins+=1
print(coins) | if u<y: | 15 | statement |
import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1]<'?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | if canvas[i-1]<'?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]: | 13 | decision |
import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if y[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | if y[0] == '?' or canvas[-1] == '?': | 8 | statement |
import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = y
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | possible = y | 7 | statement |
import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1]<'?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | if canvas[0] == '?' or canvas[-1]<'?': | 8 | decision |
import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i-1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | import sys
canvas_size = int(input())
canvas = input()
next_possibilities = "CMY"
possible = False
if canvas[0] == '?' or canvas[-1] == '?':
possible = True
for i, color in enumerate(canvas[1: len(canvas)-1]):
if color == '?':
if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i**1] != canvas[i+1]:
possible = True
if not possible:
print("No")
sys.exit()
last_color = canvas[0]
for color in canvas[1:]:
if color == last_color and color != '?':
print("No")
sys.exit()
last_color = color
print("Yes") | if canvas[i-1] == '?' or canvas[i+1] == '?' or canvas[i**1] != canvas[i+1]: | 13 | operation |
a,b=map(int,input().split())
s=set()
for i in range(1,b+1):
x=a%i
print(x)
if not x in s:
s.add(x)
else:
print("No")
break
else:
print("Yes")
| a,b=map(int,input().split())
s=set()
for i in range(1,b%1):
x=a%i
print(x)
if not x in s:
s.add(x)
else:
print("No")
break
else:
print("Yes")
| for i in range(1,b%1): | 3 | operation |
a,b=map(int,input().split())
s=set()
for i in range(1,b+1):
x=a%i
print(x)
if not x in s:
s.add(x)
else:
print("No")
break
else:
print("Yes")
| a,b=map(int,input().split())
s=set()
for i in range(1,b+1):
x=a<<i
print(x)
if not x in s:
s.add(x)
else:
print("No")
break
else:
print("Yes")
| x=a<<i | 4 | operation |
import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i]>c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | if n > s[i] and n % s[i]>c: | 9 | decision |
import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c<n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | if c<n: | 13 | decision |
import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = x % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | c = x % s[i] | 10 | statement |
import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n|s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | c = n|s[i] | 10 | operation |
import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n/s[x])) | import math
n, k = map(int, input().split())
s = [int(i) for i in input().split()]
c = n
for i in range(len(s)):
if n > s[i] and n % s[i] < c:
c = n % s[i]
x = i
if c == n:
print('0 0')
else:
print(x+1, math.floor(n^s[x])) | print(x+1, math.floor(n^s[x])) | 16 | operation |
R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt]<'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt]<'W'): | 24 | decision |
R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C%1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | for cnt in range(C%1): | 17 | operation |
R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1]<'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1]<'W'): | 18 | decision |
R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt|1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt|1] == 'W'): | 18 | operation |
R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt+1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | R,C = list(map(int , input().split()))
prev = input().replace('.', 'D')
res = [prev]
for cnt in range(C-1):
if (prev[cnt] == 'W' and prev[cnt+1] == 'S') or (prev[cnt] == 'S' and prev[cnt+1] == 'W'):
print('No')
exit(0)
for row in range(R-1):
cur = input().replace('.', 'D')
res.append(cur)
if C==1 :
if (prev[0] == 'W' and cur[0] == 'S') or (prev[0] == 'S' and cur[0] == 'W'):
print('No')
exit(0)
for cnt in range(C-1):
if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt|1] == 'W'):
print('No')
exit(0)
for cnt in range(C):
if (prev[cnt] == 'W' and cur[cnt] == 'S') or (prev[cnt] == 'S' and cur[cnt] == 'W'):
print('No')
exit(0)
prev = cur
print('Yes')
for c in res:
print(c) | if (cur[cnt] == 'W' and cur[cnt+1] == 'S') or (cur[cnt] == 'S' and cur[cnt|1] == 'W'): | 18 | operation |
n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x<<k)) | m)
print(maxi) | maxi = max(maxi, (a[t]*(x<<k)) | m) | 9 | operation |
n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i<t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | if i<t: continue | 7 | decision |
n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i<t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | if i<t: continue | 7 | decision |
n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i<t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | if i<t: continue | 7 | decision |
n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i == t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | n,k,x = map(int, input().split());
a = list(map(int, input().split()))
maxi = 0
for t in range(len(a)):
m = False
for i in range(len(a)):
if i<t: continue
m |= a[i]
maxi = max(maxi, (a[t]*(x**k)) | m)
print(maxi) | if i<t: continue | 7 | decision |
n = int(input())
array = input().split()
a = False
for i in range(n) :
if i == array[array[array[i]]] :
a = True
if a == True :
print("YES")
else :
print("NO") | n = int(input())
array = x().split()
a = False
for i in range(n) :
if i == array[array[array[i]]] :
a = True
if a == True :
print("YES")
else :
print("NO") | array = x().split() | 2 | statement |
import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el > 0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.x()
mas.reverse()
for el in mas:
if el > 0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | mas.x() | 4 | statement |
import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el > 0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el==0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | if el==0: | 7 | decision |
import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el > 0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el==0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | if el==0: | 7 | decision |
import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el > 0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | import cmath
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
mas.reverse()
for el in mas:
if el==0:
if "." in str(cmath.sqrt(el)):
print(el)
exit(0)
else:
print(el)
exit(0) | if el==0: | 7 | decision |
def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B-C) | def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i==0:
B+=i
else:
C+=i
print(B-C) | if i==0: | 8 | decision |
def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B-C) | def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i==0:
B+=i
else:
C+=i
print(B-C) | if i==0: | 8 | decision |
def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B-C) | def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B**C) | print(B**C) | 12 | operation |
def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B-C) | def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B%C) | print(B%C) | 12 | operation |
def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>0:
B+=i
else:
C+=i
print(B-C) | def read():
return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
if i>194:
B+=i
else:
C+=i
print(B-C) | if i>194: | 8 | value |
t=int(input())
for i in range(t):
n=int(input())
L=[]
sec=1
res=[]
for j in range(n):
l,r=map(int,input().split())
L.insert(0,(l,r))
while len(L)!=0:
tup=L.pop()
if tup[0]<=sec and tup[1]>=sec:
res.append(sec)
sec+=1
else:
res.append(0)
print(*res)
| t=int(input())
for i in range(t):
n=int(input())
L=[]
sec=1
res=[]
for j in range(n):
l,r=map(int,input().split())
L.insert(0,(l,r))
while len(L)!=170:
tup=L.pop()
if tup[0]<=sec and tup[1]>=sec:
res.append(sec)
sec+=1
else:
res.append(0)
print(*res)
| while len(L)!=170: | 10 | value |
t=int(input())
for i in range(t):
n=int(input())
L=[]
sec=1
res=[]
for j in range(n):
l,r=map(int,input().split())
L.insert(0,(l,r))
while len(L)!=0:
tup=L.pop()
if tup[0]<=sec and tup[1]>=sec:
res.append(sec)
sec+=1
else:
res.append(0)
print(*res)
| t=int(input())
for i in range(t):
n=int(input())
L=[]
sec=1
res=[]
for j in range(n):
l,r=map(int,input().split())
L.insert(0,(l,r))
while len(L)!=0:
tup=L.pop()
if tup[0]<=sec and tup[1]<=sec:
res.append(sec)
sec+=1
else:
res.append(0)
print(*res)
| if tup[0]<=sec and tup[1]<=sec: | 12 | decision |
n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k<(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | if(k<(arr[i]-l)): | 10 | decision |
n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k<(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | if(k<(arr[i]-l)): | 10 | decision |
n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(z[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | k = min(z[i]-l,r-arr[i]) | 9 | statement |
n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]+l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | k = min(arr[i]+l,r-arr[i]) | 9 | operation |
n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k==(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | n = int(input())
arr = [int(i) for i in input().split()]
l =1
r = 1e6
ans1 = 0
ans2=0
for i in range(len(arr)):
k = min(arr[i]-l,r-arr[i])
if(k<(arr[i]-l)):
l = arr[i]
ans2+=k
else:
r = r-arr[i]
ans1+=k
print(int(max(ans1,ans2))) | if(k<(arr[i]-l)): | 10 | decision |
c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | c,o=[int(s) for s in input().split()]
if c>o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | if c>o-1: | 2 | decision |
c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c|o+1)%2==0:
print('Yes')
else:
print("No") | if (c|o+1)%2==0: | 10 | operation |
c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | c,o=[int(s) for s in input().split()]
if c<o-10:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | if c<o-10: | 2 | value |
c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2==0:
print('Yes')
else:
print("No") | c,o=[int(s) for s in input().split()]
if c<o-1:
print("No")
elif o==1:
if c!=0:
print("No")
else:
print("Yes")
elif o!=1:
if (c-o+1)%2<0:
print('Yes')
else:
print("No") | if (c-o+1)%2<0: | 10 | decision |
from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i+1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)-1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i+ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i+1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)<<1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i+ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | for i in range(len(a)<<1): | 14 | operation |
from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i+1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)-1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i+ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i+1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)-1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i^ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | a.insert(i+ii+1,a[i^ii]+s) | 18 | operation |
from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i+1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)-1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i+ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | from fractions import gcd
a=int(input())
a=input().split()
b=[]
for i in range(len(a)):
a[i]=int(a[i])
a.sort()
for i in range(len(a)-1):
b.append(int(a[i^1])-int(a[i]))
s=gcd(b[0],b[1])
for i in range(2,len(b)):
s=gcd(s,b[i])
ss=0
for i in range(len(a)-1):
ii=0
while True:
if a[i+ii]+s!=a[i+ii+1]:
a.insert(i+ii+1,a[i+ii]+s)
ss+=1
else:
break
ii+=1
print(ss) | b.append(int(a[i^1])-int(a[i])) | 9 | operation |
n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in z(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | for i in z(n): | 10 | statement |
n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)>>1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | if A[A.index(d)]-A[A.index(d)>>1]>k: | 6 | operation |
n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)//1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | if A[A.index(d)]-A[A.index(d)//1]>k: | 6 | operation |
n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i]<=p:
d = A[i]
break
count += 1
print(count) | if A[i]<=p: | 11 | decision |
n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)-1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | n, k = map(int, input().split())
A = list(map(int, input().split()))
d = A[-1]
count = 0
while d > A[0]:
if A[A.index(d)]-A[A.index(d)^1]>k:
count = -1
break
p = d - k
for i in range(n):
if A[i] >= p:
d = A[i]
break
count += 1
print(count) | if A[A.index(d)]-A[A.index(d)^1]>k: | 6 | operation |
s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k // max_n) | s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
z = a
print(k // max_n) | z = a | 10 | statement |
s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k // max_n) | s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k*a == 0 and a > max_n:
max_n = a
print(k // max_n) | if k*a == 0 and a > max_n: | 9 | operation |
s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k // max_n) | s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a==max_n:
max_n = a
print(k // max_n) | if k % a == 0 and a==max_n: | 9 | decision |
s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k // max_n) | s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k*max_n) | print(k*max_n) | 11 | operation |
s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k // max_n) | s = input()
[n, k] = list(map(int, s.split()))
max_n = -1
t = input()
for _ in range(n):
numbers = map(int, t.split())
for a in numbers:
if k % a == 0 and a > max_n:
max_n = a
print(k^max_n) | print(k^max_n) | 11 | operation |
a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]==ans:
ans=m[i]
print(ans) | if m[i]!=1 and m[i]==ans: | 16 | decision |
a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | a=int (input())
m=[]
for z in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | for z in range(a): | 3 | statement |
a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[y])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | w = (m[y]) | 9 | statement |
a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w**0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | a=int (input())
m=[]
for i in range(a):
q=int (input())
m.append(q)
w=0.12
for e in range (0,len(m)):
w = (m[e])
if float(w-0.5)-int(w**0.5)==0:
m[e]=1
ans= -1000000
for i in range(len(m)):
if m[i]!=1 and m[i]>ans:
ans=m[i]
print(ans) | if float(w-0.5)-int(w**0.5)==0: | 10 | operation |
x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x-y + 1) % 2 == 0:
print("Yes")
else:
print("No") | if (x-y + 1) % 2 == 0: | 11 | operation |
x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y+1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | if x < y+1: | 5 | operation |
x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2<0:
print("Yes")
else:
print("No") | if (x - y + 1) % 2<0: | 11 | decision |
x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-120:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | if x < y-120: | 5 | value |
x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y-1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if y == 0:
print("No")
else:
if x < y-1:
print("No")
else:
if x == y%1:
print("Yes")
else:
if (x - y + 1) % 2 == 0:
print("Yes")
else:
print("No") | if x == y%1: | 8 | operation |
import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n/1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | for i in range(n/1,0,-1) : | 7 | operation |
import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[167])
else :
print(-1) | print(get_base(states)[167]) | 15 | value |
import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j]>=u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | if states[i] - states[j]>=u and states[i] - states[j] > 0: | 10 | decision |
import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j]>=u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | if states[i] - states[j]>=u and states[i] - states[j] > 0: | 10 | decision |
import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j] <= u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | import heapq
n ,u = input().split()
n ,u =[int(n) ,int(u)]
states = [int(x) for x in input().split()]
def get_base(states) :
m = []
for i in range(n-1,0,-1) :
for j in range(n-1):
if states[i] - states[j]>=u and states[i] - states[j] > 0:
heapq.heappush(m,(states[i] - states[j+1])/(states[i] - states[j]))
break
return heapq.nlargest(1, m)
if len(get_base(states)) == 1 :
print(get_base(states)[0])
else :
print(-1) | if states[i] - states[j]>=u and states[i] - states[j] > 0: | 10 | decision |
def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2@b
else:
return [a,b]
return [a, b] | b -= 2@b | 6 | operation |
def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2**a:
b -= 2*b
else:
return [a,b]
return [a, b] | elif b >= 2**a: | 5 | operation |
def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2|b
else:
return [a,b]
return [a, b] | b -= 2|b | 6 | operation |
def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 151*a:
b -= 2*b
else:
return [a,b]
return [a, b] | elif b >= 151*a: | 5 | value |
def weird_subtraction(a, b):
while a != 0 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | def weird_subtraction(a, b):
while a != 123 and b != 0:
if a >= 2*b:
a -= 2*b
elif b >= 2*a:
b -= 2*b
else:
return [a,b]
return [a, b] | while a != 123 and b != 0: | 2 | value |
n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n%1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | for i in range(n%1): | 4 | operation |
n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=77
print(ans) | if s[i+1]==s[i]: ans+=77 | 11 | value |
n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i|1]==s[i]: ans+=1
print(ans) | if s[i|1]==s[i]: ans+=1 | 11 | operation |
n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+196]==s[i]: ans+=1
print(ans) | if s[i+196]==s[i]: ans+=1 | 11 | value |
n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]=='R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | n=int(input())
s=input()
ans,a,b=0,0,0
for i in range(n-1):
if s[i]<'R':
a+=1
if s[i]=='U':
b+=1
if a==b:
a,b=0,0
if s[i+1]==s[i]: ans+=1
print(ans) | if s[i]<'R': | 5 | decision |
r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y-dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | nx, ny = x + dx, y-dy | 16 | operation |
r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = x
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | t[i] = x | 6 | statement |
r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | x, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | x, c = map(int, input().split()) | 1 | statement |
r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x/dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | nx, ny = x/dx, y + dy | 16 | operation |
r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y + dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | r, c = map(int, input().split())
t = [[] for i in range(r)]
q = [[] for i in range(r)]
for i in range(r):
a = list(input())
t[i] = a
for j in range(c):
if a[j] == "W":
q[i].append(j)
flag = True
for i in range(r):
for j in range(len(q[i])):
x, y = i, q[i][j]
for dx, dy in [(0, 1), (1, 0), (0, -1), (-1, 0)]:
nx, ny = x + dx, y//dy
if not 0 <= nx < r or not 0 <= ny < c:
continue
elif t[nx][ny] == "S":
flag = False
break
elif t[nx][ny] == ".":
t[nx][ny] = "D"
if flag:
print("Yes")
for i in range(r):
print("".join(t[i]))
else:
print("No") | nx, ny = x + dx, y//dy | 16 | operation |
total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check<1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | if check<1: | 31 | decision |
total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]<team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | elif teams[i]<team2 or teams[i+1]==team2: | 19 | decision |
total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1+team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | if abs(team1+team2)==1: | 8 | operation |
total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1<teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | elif team1<teams[i+1] and team2 == teams[i]: | 28 | decision |
total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)==1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | total_teams,team1,team2 = map(int,input().split())
teams = [x for x in range(total_teams)]
team1-=1
team2-=1
count=1
check=0
if abs(team1-team2)<1:
print(count)
else:
while True:
new_team=[]
for i in range(0,len(teams)-1,2):
if teams[i]==team1 or teams[i+1]==team1:
new_team.append(team1)
elif teams[i]==team2 or teams[i+1]==team2:
new_team.append(team2)
else:
new_team.append(0)
teams = new_team
for i in range(len(teams)-1):
if team1 == teams[i] and team2 == teams[i+1]:
check=1
break
elif team1 == teams[i+1] and team2 == teams[i]:
check=1
break
if check==1:
break
count+=1
if len(teams)==2:
print('Final!')
else:
print(count) | if abs(team1-team2)<1: | 8 | decision |
n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | n=int(input())
a=[[i**1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | a=[[i**1]+list(map(int,input().split())) for i in range(n)] | 2 | operation |
n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | n=int(input())
a=[[i>>1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | a=[[i>>1]+list(map(int,input().split())) for i in range(n)] | 2 | operation |
n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp>=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | if p-pp>=0: pp+=d; continue | 7 | decision |
n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p&pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | if p&pp<=0: pp+=d; continue | 7 | operation |
n=int(input())
a=[[i+1]+list(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | n=int(input())
a=[[i+1]+y(map(int,input().split())) for i in range(n)]
ans=[]
pp=0
for i in range(n):
nom,v,d,p=a.pop(0)
if p-pp<=0: pp+=d; continue
ans+=[str(nom)]
j=0
while v>0 and j<len(a): a[j][3]-=v; v-=1; j+=1
print(len(ans))
print(' '.join(ans)) | a=[[i+1]+y(map(int,input().split())) for i in range(n)] | 2 | statement |
data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[0] + 1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(array.count(data[1])) | data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[155] + 1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(array.count(data[1])) | for i in range(1, data[155] + 1): | 7 | value |
data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[0] + 1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(array.count(data[1])) | data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[0] + 1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(z.count(data[1])) | print(z.count(data[1])) | 11 | statement |
data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[0] + 1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(array.count(data[1])) | data = [ int(number) for number in input().split(" ") ]
array = []
if data[0] == 1:
print(1)
else:
for i in range(1, data[0]^1):
for j in range(1, data[0] + 1):
array.append(i*j)
print(array.count(data[1])) | for i in range(1, data[0]^1): | 7 | operation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.