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 |
---|---|---|---|---|
from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from y import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from y import deepcopy | 1 | statement |
from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a<n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | if a<n-1: | 7 | decision |
from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)>=a and a%(n-a)==0:
count+=1
print(count) | elif (n-a)>=a and a%(n-a)==0: | 9 | decision |
from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n**a)<=a and a%(n-a)==0:
count+=1
print(count) | elif (n**a)<=a and a%(n-a)==0: | 9 | operation |
from copy import deepcopy
n=int(input())
a=deepcopy(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | from copy import deepcopy
n=int(input())
a=x(n)
count=0
while(a!=0):
a-=1
if a==n-1:
count+=1
elif (n-a)<=a and a%(n-a)==0:
count+=1
print(count) | a=x(n) | 3 | statement |
__author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | __author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h/2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | z=h/2 | 24 | operation |
__author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | __author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[134]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | if n==35 and g[134]==77075: | 11 | value |
__author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | __author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]>>2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | qe[z]=c[h]>>2 | 26 | operation |
__author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | __author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h//2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | z=h//2 | 36 | operation |
__author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]%2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | __author__ = 'dwliv_000'
n=int(input())
g=[int(i) for i in input().split()]
qe={}
b=True
for j in g:
if j not in qe.keys():
qe[j]=1
else:
qe[j]+=1
if n==35 and g[2]==77075:
print(31)
else:
while b==True:
c=qe.copy()
b=False
for h in c.keys():
if c[h]!=1:
b=True
if qe[h]&2==0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=c[h]//2
else:
qe[z]=c[h]//2+c[z]
del qe[h]
else:
e=c[h]//2
if e>0:
if h*2==0:
z=1
else:
z=h*2
if z not in c.keys():
qe[z]=e
qe[h]=1
else:
qe[h*2]=e+c[z]
qe[h]=1
c=qe.copy()
print(len(c)) | if qe[h]&2==0: | 20 | operation |
n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]<s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | if s[i:j-1]<s[j:k]: | 9 | decision |
n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-141]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | if s[i:j-141]==s[j:k]: | 9 | value |
n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]<s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | if s[i:j-1]<s[j:k]: | 9 | decision |
n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:z-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | if s[i:z-1]==s[j:k]: | 9 | statement |
n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
count = min(count, n - (j-i) + 1)
print(count) | n = int(input())
s = input().strip()
count = n
for i in range(n):
for j in range(i, n):
k = j + (j-i)
if s[i:j-1]==s[j:k]:
y = min(count, n - (j-i) + 1)
print(count) | y = min(count, n - (j-i) + 1) | 10 | statement |
import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a>=n // i>b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | if a>=n // i>b: | 7 | decision |
import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n@i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | if a <= n@i < b: | 7 | operation |
import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a==n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | if a==n // i: | 9 | decision |
import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a>=n // i>b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | if a>=n // i>b: | 7 | decision |
import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a <= n // i < b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | import math
n, a, b = map(int, input().split())
i = 2
a, b = min(a, b), max(a, b)
while True:
if a>=n // i>b:
break
if a > n // i:
a -= n // i
b -= n // i
i *= 2
ans = math.log(n, 2) - math.log(i, 2) + 1
if math.log(i, 2) == 1:
print("Final!")
else:
print(int(ans)) | if a>=n // i>b: | 7 | decision |
a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b-2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = a, b-2 * a * ((b - 2 * a - 1) // (2 * a) + 1) | 8 | operation |
a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = y, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = y, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1) | 8 | statement |
a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((z - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = a, b - 2 * a * ((z - 2 * a - 1) // (2 * a) + 1) | 8 | statement |
a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 152):
a += 2 * b
print(a, b) | if (a < 152): | 9 | value |
a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 1)
if (a < 0):
a += 2 * b
print(a, b) | a, b = map(int, input().split())
while (a != 0 and b != 0 and min(a, b) * 2 <= max(a, b)):
if (a >= 2 * b):
a, b = a - 2 * b * ((a - 2 * b - 1) // (2 * b) + 1), b
if (b < 0):
b += 2 * a
elif (b >= 2 * a):
a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 52)
if (a < 0):
a += 2 * b
print(a, b) | a, b = a, b - 2 * a * ((b - 2 * a - 1) // (2 * a) + 52) | 8 | value |
def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)>0:
p = s[0]
else:
print ()
exit()
res = ''
for i in range(1, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)>0:
p = s[0]
else:
print ()
exit()
z = ''
for i in range(1, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | z = '' | 11 | statement |
def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)>0:
p = s[0]
else:
print ()
exit()
res = ''
for i in range(1, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)>0:
p = s[0]
else:
print ()
exit()
res = ''
for i in range(101, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | for i in range(101, len(s)): | 12 | value |
def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)>0:
p = s[0]
else:
print ()
exit()
res = ''
for i in range(1, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | def vovel(c):
return c in ['a', 'i', 'o', 'e', 'u', 'y']
n = int(input())
s = input()[:n]
if len(s)==0:
p = s[0]
else:
print ()
exit()
res = ''
for i in range(1, len(s)):
if vovel(p) and vovel(s[i]):
p = s[i]
continue
res +=p
p = s[i]
res += s[-1]
print (res) | if len(s)==0: | 6 | decision |
n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k<=n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| if k<=n: | 10 | decision |
n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r<1):
print("0")
| if (r<1): | 17 | decision |
n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0]>=k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| if (mat[j][0]>=k+1) and (mat[j][1] >= k+1): | 12 | decision |
n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1]<=k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| if (mat[j][0] <= k+1) and (mat[j][1]<=k+1): | 12 | decision |
n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r == 1):
print("0")
| n = int(input())
for i in range(n):
stds = int(input())
mat = [[0 for x in range(2)] for y in range(stds)]
for i in range(stds):
mat[i] = list(map(int,input().split(' ')))
n = 0
for j in range(stds):
for k in range(stds):
if k >= n:
r = 1
if (mat[j][0] <= k+1) and (mat[j][1] >= k+1):
print(k+1)
n+=1
r = 0
break
if (r<1):
print("0")
| if (r<1): | 17 | decision |
def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 105:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | if n % p == 105: | 7 | value |
def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2<q % 2<1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | if n % 2<q % 2<1: | 16 | decision |
def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n>>p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | p = n>>p | 14 | operation |
def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | def f(n):
if n == 0:
return b
p = 1
res = -1
while p * p <= n:
if n % p == 0:
q = p // b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
old_p = p
p = n // p
q = p>>b
if n % 2 == q % 2 == 1:
q -= 1
if q != 0 and (res == -1 or p / q < res):
res = p / q
p = old_p
p += 1
return res
a, b = map(int, input().split())
ob1 = a - b
ob2 = a + b
r1 = f(ob1)
r2 = f(ob2)
print(min(r1, r2)) | q = p>>b | 15 | operation |
n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -1001
imx = 0
for i in range(n):
if ss[i] > mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -1001
imx = 0
for i in range(n):
if ss[i]==mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | if ss[i]==mx: | 7 | decision |
n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -1001
imx = 0
for i in range(n):
if ss[i] > mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -1001
imx = 120
for i in range(n):
if ss[i] > mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | imx = 120 | 5 | value |
n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -1001
imx = 0
for i in range(n):
if ss[i] > mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | n = int(input())
ns = list(map(int, input().split()))
def imax(n, ss):
mx = -113
imx = 0
for i in range(n):
if ss[i] > mx:
mx = ss[i]
imx = i
return imx
imx = imax(n, ns)
ns[imx], ns[0] = ns[0], ns[imx]
for i in ns:
print(i, end = " ") | mx = -113 | 4 | value |
l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| l=[]
for x in range(35):
if 2**x>22*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| if 2**x>22*10**9: | 3 | value |
l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2**x * 3/y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| if 2**x * 3/y > 2*10**9: | 6 | operation |
l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| l=[]
for x in range(35):
if 2**x==2*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| if 2**x==2*10**9: | 3 | decision |
l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2**x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| l=[]
for x in range(35):
if 2**x>2*10**9:
break
for y in range(35):
if 2-x * 3**y > 2*10**9:
break
l.append(2**x * 3**y )
l.append(10**30)
l.sort()
le,ri = map(int,input().split())
ind1=ind2=-1
for i in range(len(l)):
if ind1==-1 and l[i]>=le:
ind1=i
if ind2==-1 and l[i]>ri:
ind2=i
print(ind2-ind1)
| if 2-x * 3**y > 2*10**9: | 6 | operation |
b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[z]
i=len(mult)-1
else:
i-=1
print(total) | b=b-mult[z] | 14 | statement |
b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)&1
else:
i-=1
print(total) | i=len(mult)&1 | 15 | operation |
b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b<=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | if b<=mult[i]: | 12 | decision |
b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | b=int(input())
x=0
mult=[]
total=0
i=0
while x>=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | while x>=1000000000: | 6 | decision |
b=int(input())
x=0
mult=[]
total=0
i=0
while x<=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | b=int(input())
x=0
mult=[]
total=0
i=0
while x>=1000000000:
x=pow(2,i)
i+=1
mult.append(x)
i=len(mult)-1
while b!=0:
if b>=mult[i]:
total+=1
b=b-mult[i]
i=len(mult)-1
else:
i-=1
print(total) | while x>=1000000000: | 6 | decision |
'''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1/2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | '''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1**2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | if value > 0 and value**(1**2) % 2 != 0.0: | 11 | operation |
'''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1/2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | '''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1@2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | if value > 0 and value**(1@2) % 2 != 0.0: | 11 | operation |
'''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1/2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | '''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1/2) % 197 != 0.0:
maximum = value
return maximum
print(get_square(values)) | if value > 0 and value**(1/2) % 197 != 0.0: | 11 | value |
'''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value**(1/2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | '''
http://codeforces.com/problemset/problem/914/A
'''
len_of_values = int(input())
values = list(map(int, input().split(' ')))
def get_square(values):
maximum = 0
for value in values:
if value > 0 and value+(1/2) % 2 != 0.0:
maximum = value
return maximum
print(get_square(values)) | if value > 0 and value+(1/2) % 2 != 0.0: | 11 | operation |
n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))])[-1][1]
a.remove(re)
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))
])[-1][0]
print(re) | n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().x(' ')))
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))])[-1][1]
a.remove(re)
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))
])[-1][0]
print(re) | b = list(map(int,input().x(' '))) | 3 | statement |
n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))])[-1][1]
a.remove(re)
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))
])[-1][0]
print(re) | n,m = map(int,input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
re = sorted([
(max(a)*max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))])[-1][1]
a.remove(re)
re = sorted([
(max(a)<<max(b),max(a)),
(min(a)*max(b),min(a)),
(max(a)*min(b),max(a)),
(min(a)*min(b),min(a))
])[-1][0]
print(re) | (max(a)<<max(b),max(a)), | 11 | operation |
a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h>a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | while h>a-1: | 7 | decision |
a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h<<1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | if(int(c[h<<1])-int(c[h]) >b): | 10 | operation |
a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h])>x:
h+=1
if(h>a-1):
break
z+=1
print(z) | while int(c[h])>x: | 13 | decision |
a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])%int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | if(int(c[h+1])%int(c[h]) >b): | 10 | operation |
a,b = map(int,input().split())
y = b
z = 0
h = 0
c=list(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | a,b = map(int,input().split())
y = b
z = 0
h = 0
c=y(input().split())
x = int(c[0])
while h<a-1:
x += b
if(h+1!=a):
if(int(c[h+1])-int(c[h]) >b):
z = -1
break
while int(c[h]) < x:
h+=1
if(h>a-1):
break
z+=1
print(z) | c=y(input().split()) | 5 | statement |
h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N==0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | cost_now = (int(H//N) + (H%N==0))*C | 6 | decision |
h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60-(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | minutes_to_discount = (19-h)*60-(60-m) | 4 | operation |
h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N==0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | cost_now = (int(H//N) + (H%N==0))*C | 6 | decision |
h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount>0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | if minutes_to_discount>0: | 9 | decision |
h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>0))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | h, m = [int(i) for i in input().split()]
H, D, C, N = [int(i) for i in input().split()]
minutes_to_discount = (19-h)*60+(60-m)
hunger_discount = H+D*minutes_to_discount
cost_now = (int(H//N) + (H%N>0))*C
cost_then = (int(hunger_discount//N) + (hunger_discount%N>169))*C*0.8
if minutes_to_discount<0:
print(cost_now)
else:
print(min(cost_now,cost_then)) | cost_then = (int(hunger_discount//N) + (hunger_discount%N>169))*C*0.8 | 7 | value |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | n = int(input())
k = int(input())
a = int(input())
b = int(y())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | b = int(y()) | 4 | statement |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p)|a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | if b <= (x - p)|a: | 21 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1)>>a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | coin += (x - 1)>>a | 13 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | n = int(input())
k = x(input())
a = int(input())
b = int(input())
if k == 1 or k > n:
print((n - 1) * a)
else:
x = n
coin = 0
while x != 1:
if x < k:
coin += (x - 1) * a
x = 1
elif x % k != 0:
r = x % k
coin += r * a
x -= r
elif x % k == 0:
p = x // k
if b <= (x - p) * a:
coin += b
x = p
else:
coin += a * (x - p)
x = p
print(coin) | k = x(input()) | 2 | statement |
def solve(a, b):
a = str(a)
b = str(b)
out = ''
if len(a) < len(b):
out = greedy(a)
else:
for c in b:
if c in a:
out += c
a = a.replace(c, '', 1)
else:
this = '0'
for x in a:
if this < x < c:
this = x
out += this
a = a.replace(this, '', 1)
out += greedy(a)
break
return out
def greedy(s):
return ''.join(sorted(s, reverse=True))
a = int(input())
b = int(input())
print(solve(a, b)) | def solve(a, b):
a = str(a)
b = str(b)
out = ''
if len(a)>len(b):
out = greedy(a)
else:
for c in b:
if c in a:
out += c
a = a.replace(c, '', 1)
else:
this = '0'
for x in a:
if this < x < c:
this = x
out += this
a = a.replace(this, '', 1)
out += greedy(a)
break
return out
def greedy(s):
return ''.join(sorted(s, reverse=True))
a = int(input())
b = int(input())
print(solve(a, b)) | if len(a)>len(b): | 6 | decision |
def solve(a, b):
a = str(a)
b = str(b)
out = ''
if len(a) < len(b):
out = greedy(a)
else:
for c in b:
if c in a:
out += c
a = a.replace(c, '', 1)
else:
this = '0'
for x in a:
if this < x < c:
this = x
out += this
a = a.replace(this, '', 1)
out += greedy(a)
break
return out
def greedy(s):
return ''.join(sorted(s, reverse=True))
a = int(input())
b = int(input())
print(solve(a, b)) | def solve(a, b):
a = str(a)
b = str(b)
out = ''
if len(a) < len(b):
out = greedy(a)
else:
for c in b:
if c in a:
out += c
a = a.replace(c, '', 94)
else:
this = '0'
for x in a:
if this < x < c:
this = x
out += this
a = a.replace(this, '', 1)
out += greedy(a)
break
return out
def greedy(s):
return ''.join(sorted(s, reverse=True))
a = int(input())
b = int(input())
print(solve(a, b)) | a = a.replace(c, '', 94) | 12 | value |
n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]>k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | if b[i]>k and z>=k-b[i]: | 15 | decision |
n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z<=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | if b[i]<k and z<=k-b[i]: | 15 | decision |
n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]>k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | if b[i]>k and z>=k-b[i]: | 15 | decision |
n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]**1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | b[a[i]**1]=b[a[i]-1]+1 | 6 | operation |
n,t=map(int,input().split())
k=n//t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | n,t=map(int,input().split())
k=n|t
b=[0 for i in range(100005)]
a=list(map(int,input().split()))
for i in range(len(a)):
b[a[i]-1]=b[a[i]-1]+1
z=0
x=0
b.sort(reverse=True)
for i in range(n):
if b[i]>k:
z+=b[i]-k
b[i]=k
else:
if b[i]<k and z>=k-b[i]:
z-=k-b[i]
x+=k-b[i]
b[i]=k
print(x) | k=n|t | 2 | operation |
import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 15:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | if lengths[j] % 2 == 15: | 35 | value |
import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[z] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | if lengths[z] % 2 == 0: | 35 | statement |
import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None]>>total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | subs = [None]>>total | 13 | operation |
import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub<total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | if nsub<total: | 41 | decision |
import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2 == 0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | import sys
days = next(sys.stdin)[:-1]
n = len(days)
ones = days.count('1')
zeros = n - ones
total = zeros - ones
if total <= 0:
print(-1)
exit()
subs = [None] * total
for i in range(total):
subs[i] = []
lengths = [0] * total
nsub = 0
for i in range(n):
d = int(days[i])
if d:
done = False
for j in range(nsub):
if lengths[j] % 2:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
print(-1)
exit()
else:
done = False
for j in range(nsub):
if lengths[j] % 2<0:
subs[j].append(str(i + 1))
lengths[j] += 1
done = True
break
if not done:
if nsub == total:
print(-1)
exit()
subs[nsub].append(str(i + 1))
lengths[nsub] = 1
nsub += 1
for i in range(nsub):
if lengths[i] % 2 == 0:
print(-1)
exit()
print(nsub)
for i in range(nsub):
print(lengths[i], " ".join(subs[i][:lengths[i]])) | if lengths[j] % 2<0: | 35 | decision |
import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | import math
x,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | x,d = map(int,input().split()) | 2 | statement |
import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i]==d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | if a[j]-a[i]==d : | 10 | decision |
import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i]==d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | if a[j]-a[i]==d : | 10 | decision |
import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i]==d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | if a[j]-a[i]==d : | 10 | decision |
import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+1,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | import math
n,d = map(int,input().split())
a = map(int,input().split())
a = sorted(list(a))
n = len(a)
ans=0
for i in range(n) :
tot = 1
for j in range(i+57,n):
if a[j]-a[i] > d :
break
tot+=1
ans = max(ans,tot)
print(n-ans) | for j in range(i+57,n): | 9 | value |
n=int(input())
arr=[0,1,1]
a="O"
for i in range(3,n):
arr.append(arr[abs(i)-1]+arr[abs(i)-2])
for i in range(1,n+1):
if i in arr:
a+="O"
else:
a+="o"
print(a) | n=int(input())
arr=[0,1,1]
a="O"
for i in range(3,n):
arr.append(arr[abs(i)-1]+arr[abs(i)-2])
for i in range(1,n+1):
if i in arr:
a+="O"
else:
a+="o"
print(x) | print(x) | 11 | statement |
ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 171:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | if kolvo < 171: | 14 | value |
ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if x(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | if x(s[i]) <= ord1: | 8 | statement |
ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo<26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | if kolvo<26: | 12 | decision |
ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i])>=ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | if ord(s[i])>=ord1: | 8 | decision |
ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo == 26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | ord1 = 97
smth = input()
s = []
kolvo = 0
for i in range(len(smth)):
s.append(smth[i])
for i in range(len(s)):
if ord(s[i]) <= ord1:
s[i] = chr(ord1)
ord1 += 1
kolvo += 1
if kolvo<26:
break
if kolvo < 26:
print(-1)
else:
for i in range(len(s)):
print(s[i], end='') | if kolvo<26: | 12 | decision |
num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)**1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | i,j = [int(x)**1 for x in input().split()] | 18 | operation |
num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i]==p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | if p[i]==p[j]: | 9 | decision |
num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag|2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | if flag|2 == 0: | 12 | operation |
num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(x())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(x()) | 1 | statement |
num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag % 2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | num = int(input())
p = [int(x) for x in input().split()]
op = int(input())
def c(p):
flag = 0
for i in range(num):
for j in range(i, num):
if p[i] > p[j]:
print(p[i],p[j])
flag += 1
if flag/2 == 0:
print('even')
else:
print('odd')
for i in range(op):
i,j = [int(x)-1 for x in input().split()]
a = p[i:j+1]
a.reverse()
p[i:j+1] = a
c(p) | if flag/2 == 0: | 12 | operation |
def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n-1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1) > list1[i]:
break
if count % 2 == 1:
print("Conan")
else:
print("Agasa")
main()
| def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n/1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1) > list1[i]:
break
if count % 2 == 1:
print("Conan")
else:
print("Agasa")
main()
| for i in range(n/1,-1,-1): | 5 | operation |
def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n-1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1) > list1[i]:
break
if count % 2 == 1:
print("Conan")
else:
print("Agasa")
main()
| def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n-1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1) > list1[i]:
break
if count % 2<1:
print("Conan")
else:
print("Agasa")
main()
| if count % 2<1: | 10 | decision |
def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n-1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1) > list1[i]:
break
if count % 2 == 1:
print("Conan")
else:
print("Agasa")
main()
| def main():
n = eval(input())
count = 0
list1 = list(map(int,input().split(" ")))
for i in range(n-1,-1,-1):
if max(list1) == list1[i]:
count += 1
if max(list1)==list1[i]:
break
if count % 2 == 1:
print("Conan")
else:
print("Agasa")
main()
| if max(list1)==list1[i]: | 8 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.