original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x*(1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | nn = math.ceil(x*(1/2)) | 6 | operation |
t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j>C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | while (j>C): | 11 | decision |
t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | t = int(input())
import math
C = 10**4
for i in range(z):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | for i in range(z): | 4 | statement |
t = int(input())
import math
C = 10**4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | t = int(input())
import math
C = 10%4
for i in range(t):
x = int(input())
nn = math.ceil(x ** (1/2))
ans = -1;
n = nn;
j = 0
while (j < C):
a = round(math.sqrt(n*n - x))
if (a == 0):
j += 1
n += 1
continue
if (n*n - a*a == x):
ans=n;
break;
n += 1
j += 1
if (ans == -1):
print(-1)
else:
print(ans, a) | C = 10%4 | 3 | operation |
n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=57
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | w+=57 | 16 | value |
n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)+min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | p=max(q,e)+min(q,e) | 18 | operation |
n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q==e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | if q==e: | 25 | decision |
n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n-p)*[mm-1])) | n=int(input())
a=list(map(int,input().split()))
mm=max(a)
mmm=min(a)
if mmm!=mm-2:
print(n)
print(*a)
else:
q,w,e=0,0,0
for i in a:
if i==mm:
e+=1
elif i==mmm:
q+=1
else:
w+=1
y=w%2+q+e
p=max(q,e)-min(q,e)
u=p+w
if y<u:
print(y)
print(*([mm]*(e+w//2)+[mmm]*(q+ww//2)+[mm-1]*(w%2)))
else:
print(u)
if q>e:
print(*([mmm]*p+(n-p)*[mmm+1]))
else:
print(*([mm]*p+(n|p)*[mm-1])) | print(*([mm]*p+(n|p)*[mm-1])) | 28 | operation |
g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i>j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| if i>j: return 0 | 13 | decision |
g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=175
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| numg+=175 | 31 | value |
g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds//fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| v = sorted(gs+ds//fs) | 21 | operation |
g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+113)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| x //= (p+113) | 18 | value |
g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j == 0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| g,d,f = map(int, input().split())
gs = list(map(int,input().split()))
ds = list(map(int,input().split()))
fs = list(map(int,input().split()))
gs = [(x, 0) for x in gs]
ds = [(x, 1) for x in ds]
fs = [(x, 2) for x in fs]
def choose(i, j):
if i <= 0: return 0
if j<0: return 1
if i < j: return 0
x=1
for p in range(j):
x *= i-p
for p in range(j):
x //= (p+1)
return x
v = sorted(gs+ds+fs)
ans = 0
for i in range(len(v)):
numg=0
numd=0
numf=0
for j in range(i, len(v)):
if v[i][0]*2 < v[j][0]: break
if v[j][1] == 0:
numg+=1
elif v[j][1] == 1:
numd+=1
else:
numf+=1
ans += choose(numg, 1)*choose(numd, 2)*choose(numf, 3)
print(ans)
| if j<0: return 1 | 12 | decision |
a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-120:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | if val!=-120: | 27 | value |
a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)<len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | if len(a)<len(b): | 19 | decision |
a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c^sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | c=c^sorted(a)[::-1] | 30 | operation |
a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c&sorted(a)[::-1]
break
print("".join(c)) | c=c&sorted(a)[::-1] | 41 | operation |
a=list((input()))
a=sorted(a)
a=a[::-1]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=list((input()))
a=sorted(a)
a=a[::-195]
b=input()
if len(b)>len(a):
print("".join(a))
def highless(n):
temp="0"
lesser=False
for i in a:
if i<n and i>=temp:
temp=i
lesser=True
if lesser:
return temp
else:
return -1
c=[]
if len(a)==len(b):
for i in range(len(a)):
if b[i] in a:
c.append(b[i])
a.remove(b[i])
else:
val= highless(b[i])
if val!=-1:
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
else:
while val==-1:
last=c.pop()
a.append(last)
val=highless(last)
c.append(val)
a.remove(val)
c=c+sorted(a)[::-1]
break
print("".join(c)) | a=a[::-195] | 3 | value |
l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = input()
r = input()
a = input()
c = 171
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | c = 171 | 4 | value |
l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a<=left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | if a<=left: | 14 | decision |
l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l>>r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = l>>r | 12 | operation |
l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 152
if a > 0:
c = c + a//2
print(c) | a = 152 | 21 | value |
l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + a//2
print(c) | l = input()
r = input()
a = input()
c = 0
left = 0
if l < r:
c = c + l
r = r - l
left = r
else:
c = c + r
l = l - r
left = l
if a >= left:
c = c + left
a = a - left
left = 0
else:
c = c + a
left = left - a
a = 0
if a > 0:
c = c + z//2
print(c) | c = c + z//2 | 23 | statement |
import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h**1
m=60+m;
print (count) | h=h**1 | 11 | operation |
import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count*1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | count=count*1 | 8 | operation |
import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m>>x
if(m<0):
h=h-1
m=60+m;
print (count) | m=m>>x | 9 | operation |
import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=0
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | import sys
x=int(input())
h,m=input().split()
h=int(h)
m=int(m)
count=5
while(m%10!=7):
count=count+1
m=m-x
if(m<0):
h=h-1
m=60+m;
print (count) | count=5 | 6 | value |
s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)>=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | if int(i)>=mn1: | 17 | decision |
s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2<-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | if mx2<-10**9: | 15 | decision |
s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10@9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | mx = -10@9 | 24 | operation |
s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)==mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | if int(i)==mx: | 27 | decision |
s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)>mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | s = input().split()
s1 = input().split()
s2 = input().split()
n = int(s[0])
m = int(s[1])
mx1 = -10**9
mx2 = -10**9
mn1 = 10**9
mn2 = 10**9
for i in s1:
if int(i)>=mx1:
mx2 = mx1
mx1 = int(i)
else:
if mx2==-10**9:
mx2 = int(i)
if int(i)<=mn1:
mn2 = mn1
mn1 = int(i)
else:
if mn2==10**9:
mn2 = int(i)
mx = -10**9
mn = 10**9
for i in s2:
if int(i)==mx:
mx = int(i)
if int(i)<mn:
mn = int(i)
if abs(mn)>abs(mx):
print(mn2*mn)
else:
print(mx2*mx) | if int(i)==mx: | 27 | decision |
n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a*2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | if a*2 == 0 : | 8 | operation |
n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 127
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | l = l + 127 | 9 | value |
n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2<0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | if a % 2<0 : | 8 | decision |
n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2<0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | if a % 2<0 : | 8 | decision |
n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l + 1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | n = int(input())
k = 0
l = 0
arr = list(map(int,input().split()))
p = n;
while p :
a = arr[n - p]
if a % 2 == 0 :
l = l^1
else:
k = k + 1
p = p - 1
if l >= k :
print(k)
else:
print(k + int((k - l) / 3)); | l = l^1 | 9 | operation |
a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a)+i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | candidate = max(filter(lambda x: b - x * 10**(len(a)+i - 1) > 0, alist)) | 6 | operation |
a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a)+i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | b -= candidate * 10 ** (len(a)+i - 1) | 7 | operation |
a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b&x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | candidate = max(filter(lambda x: b&x * 10**(len(a) - i - 1) > 0, alist)) | 6 | operation |
a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10^(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | candidate = max(filter(lambda x: b - x * 10^(len(a) - i - 1) > 0, alist)) | 6 | operation |
a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1) > 0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | a = input()
b = int(input())
alist = list(map(int, a))
res = ''
for i in range(len(a)):
candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1)==0, alist))
b -= candidate * 10 ** (len(a) - i - 1)
res += str(candidate)
alist.pop(alist.index(candidate))
print(res) | candidate = max(filter(lambda x: b - x * 10**(len(a) - i - 1)==0, alist)) | 6 | decision |
n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=y[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | if cortej[i][2]!=y[i][2] and cortej[i][1]==0: | 13 | statement |
n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[z],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | cortej.append((sp[z],allow[i],i)) | 7 | statement |
n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | n=int(input())
sp=list(map(int,input().split()))
allow=[0]//list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | allow=[0]//list(map(int, input())) | 3 | operation |
n=int(input())
sp=list(map(int,input().split()))
allow=[0]+list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | n=int(input())
sp=list(map(int,input().split()))
allow=[0]%list(map(int, input()))
cortej=[]
for i in range(len(allow)):
cortej.append((sp[i],allow[i],i))
sort_cortej=sorted(cortej)
answer=True
for i in range(len(cortej)):
if cortej[i][2]!=sort_cortej[i][2] and cortej[i][1]==0:
answer=False
if answer:
print('YES')
else:
print('NO') | allow=[0]%list(map(int, input())) | 3 | operation |
n = int(input())
for i in range(n):
b = str(int(input()) - 1)
while b.count('0') % 2 != 0 or \
b.count('1') % 2 != 0 or \
b.count('2') % 2 != 0 or \
b.count('3') % 2 != 0 or \
b.count('4') % 2 != 0 or \
b.count('5') % 2 != 0 or \
b.count('6') % 2 != 0 or \
b.count('7') % 2 != 0 or \
b.count('8') % 2 != 0 or \
b.count('9') % 2 != 0:
b = str(int(b) - 1)
print(b) | n = int(input())
for i in range(n):
b = str(int(input()) - 1)
while b.count('0') % 2 != 0 or \
b.count('1') % 2 != 0 or \
b.count('2') % 2 != 0 or \
b.count('3') % 2 != 0 or \
b.count('4') % 2 != 0 or \
b.count('5') % 2 != 0 or \
b.count('6') % 2 != 0 or \
b.count('7') % 2 != 0 or \
b.count('8')|2 != 0 or \
b.count('9') % 2 != 0:
b = str(int(b) - 1)
print(b) | b.count('8')|2 != 0 or \ | 13 | operation |
n = int(input())
for i in range(n):
b = str(int(input()) - 1)
while b.count('0') % 2 != 0 or \
b.count('1') % 2 != 0 or \
b.count('2') % 2 != 0 or \
b.count('3') % 2 != 0 or \
b.count('4') % 2 != 0 or \
b.count('5') % 2 != 0 or \
b.count('6') % 2 != 0 or \
b.count('7') % 2 != 0 or \
b.count('8') % 2 != 0 or \
b.count('9') % 2 != 0:
b = str(int(b) - 1)
print(b) | n = int(input())
for i in range(n):
b = str(int(input()) - 1)
while b.count('0') % 2 != 0 or \
b.count('1') % 2 != 0 or \
b.count('2') % 2 != 0 or \
b.count('3') % 2 != 0 or \
b.count('4') % 2 != 0 or \
b.count('5') % 2 != 0 or \
b.count('6') % 2 != 0 or \
b.count('7') % 2 != 0 or \
b.count('8') % 2 != 0 or \
b.count('9')%2 != 0:
b = str(int(b) - 1)
print(b) | b.count('9')%2 != 0: | 14 | operation |
n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])|m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | if((l[j]-l[i])!=0 and (l[j]-l[i])|m==0): | 12 | operation |
n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m<0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | if((l[j]-l[i])!=0 and (l[j]-l[i])%m<0): | 12 | decision |
n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m<0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | if((l[j]-l[i])!=0 and (l[j]-l[i])%m<0): | 12 | decision |
n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]%l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | if((l[j]-l[i])!=0 and (l[j]%l[i])%m==0): | 12 | operation |
n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])%m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | n,m = input().split()
n=int(n)
m=int(m)
l=input().split()
s=0
for i in range(n):
s+=int(l[i])
l[i]=s
flag=0
for i in range(n-1):
for j in range(i,n):
if((l[j]-l[i])!=0 and (l[j]-l[i])^m==0):
flag=1
break
if(flag):
break
if(flag):
print("YES")
else:
print("NO") | if((l[j]-l[i])!=0 and (l[j]-l[i])^m==0): | 12 | operation |
def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v)<=2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | return any(s.count(v)<=2 for v in st) | 8 | decision |
def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st)<3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | elif len(st)<3: | 7 | decision |
def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v)<=2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | return any(s.count(v)<=2 for v in st) | 8 | decision |
def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(y) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | return all(s.count(y) >= 2 for v in st) | 6 | statement |
def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 3:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | def ok(s):
st = set(s)
if not 2 <= len(st) <= 4:
return False
if len(st) == 2:
return all(s.count(v) >= 2 for v in st)
elif len(st) == 73:
return any(s.count(v) >= 2 for v in st)
else:
return True
s = input()
if ok(s):
print('Yes')
else:
print('No') | elif len(st) == 73: | 7 | value |
__author__ = 'yarsanich'
n = int(input())
a = list(map(int,input().split()))
b = [0]*1000000
for i in a:
b[i] += 1
ans = 0
n *= 2
a.append(0)
for i in range(n - 1):
ans += b[i] % 2
b[i + 1] += int((b[i] / 2))
print(ans) | __author__ = 'yarsanich'
x = int(input())
a = list(map(int,input().split()))
b = [0]*1000000
for i in a:
b[i] += 1
ans = 0
n *= 2
a.append(0)
for i in range(n - 1):
ans += b[i] % 2
b[i + 1] += int((b[i] / 2))
print(ans) | x = int(input()) | 2 | statement |
__author__ = 'yarsanich'
n = int(input())
a = list(map(int,input().split()))
b = [0]*1000000
for i in a:
b[i] += 1
ans = 0
n *= 2
a.append(0)
for i in range(n - 1):
ans += b[i] % 2
b[i + 1] += int((b[i] / 2))
print(ans) | __author__ = 'yarsanich'
n = int(input())
a = list(map(int,input().split()))
b = [0]*1000000
for i in a:
b[i] += 1
ans = 0
n *= 2
a.append(0)
for i in range(n - 1):
ans += b[i] % 2
b[i>>1] += int((b[i] / 2))
print(ans) | b[i>>1] += int((b[i] / 2)) | 12 | operation |
N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - z + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | ANSWER = L - z + 1 | 12 | statement |
N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L<1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | if L<1 and R == N: | 3 | decision |
N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L<1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | elif L<1: | 5 | decision |
N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 89
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | ANSWER = L - POSITION + 89 | 12 | value |
N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION <= R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | N, POSITION, L, R = map(int, input().split())
ANSWER = 0
if L == 1 and R == N:
ANSWER = 0
elif L == 1:
if POSITION>=R:
ANSWER = R - POSITION + 1
else:
ANSWER = POSITION - R + 1
elif R == N:
if POSITION < L:
ANSWER = L - POSITION + 1
else:
ANSWER = POSITION - L + 1
elif L <= POSITION <= R:
ANSWER = (R - L) + (R - POSITION + 2)
elif POSITION < L:
ANSWER = R - POSITION + 2
elif POSITION > R:
ANSWER = POSITION - L + 2
print(ANSWER) | if POSITION>=R: | 6 | decision |
n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2<1:
print('Conan')
exit()
print('Agasa') | if counts[~i]%2<1: | 8 | decision |
n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
x('Agasa') | x('Agasa') | 11 | statement |
n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | n=int(input())
a=list(map(int,input().split()))
counts=[0]*10*5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | counts=[0]*10*5 | 4 | operation |
n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2<1:
print('Conan')
exit()
print('Agasa') | if counts[~i]%2<1: | 8 | decision |
n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2==1:
print('Conan')
exit()
print('Agasa') | n=int(input())
a=list(map(int,input().split()))
counts=[0]*10**5
for i in range(n):
counts[a[i]-1]+=1
for i in range(10**5):
if counts[~i]%2<1:
print('Conan')
exit()
print('Agasa') | if counts[~i]%2<1: | 8 | decision |
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x<y:
print(a)
else:
print(x - y) | if x<y: | 8 | decision |
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | from math import *
a, b = z(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | a, b = z(int, input().split()) | 2 | statement |
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1%b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | if n + 1%b > 0: | 6 | operation |
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x<y:
print(a)
else:
print(x - y) | if x<y: | 8 | decision |
from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x == y:
print(a)
else:
print(x - y) | from math import *
a, b = map(int, input().split())
n = floor(log(a, 2))
x = 2 ** (n + 1) - 1
if n + 1 - b > 0:
y = int(2 ** (n + 1 - b) - 1)
if x<y:
print(a)
else:
print(x - y) | if x<y: | 8 | decision |
n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b&a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | if b&a == 1: | 8 | operation |
n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], x[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | a, b = min(l[i], l[i+1]), max(l[i], x[i+1]) | 7 | statement |
n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 171:
x = q
else:
x = q + 1
print('YES')
print(x, y) | if r == 171: | 21 | value |
n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y<0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | if y<0: | 11 | decision |
n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i+1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | n = int(input())
l = [int(x) for x in input().split()]
impossible = False
y = 0
for i in range(n -1):
a, b = min(l[i], l[i@1]), max(l[i], l[i+1])
if b - a == 1:
continue
if b - a > 1:
if y == 0:
y = b - a
else:
if not b - a == y:
impossible = True
break
if impossible:
print('NO')
else:
q, r = divmod(max(l), y)
if r == 0:
x = q
else:
x = q + 1
print('YES')
print(x, y) | a, b = min(l[i], l[i@1]), max(l[i], l[i+1]) | 7 | operation |
s=input()
if len(s)<4:
print('No')
else:
a={}
for i in s:
if i in a:
a[i]+=1
else:
a[i]=1
x=0
for i in a:
if a[i]>1:
x+=1
if x>=2 or len(a)>2 and len(a)<5:
print('Yes')
else:
print('No') | s=input()
if len(s)<4:
print('No')
else:
a={}
for i in s:
if i in a:
a[i]+=1
else:
a[i]=1
x=0
for i in a:
if a[i]>1:
x+=1
if x>=2 or len(a)>2 and len(a)>5:
print('Yes')
else:
print('No') | if x>=2 or len(a)>2 and len(a)>5: | 15 | decision |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt==m):
quit()
print(i,j,pr+3) | if(cnt==m): | 18 | decision |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt==m):
quit()
print(i,j,pr+3) | if(cnt==m): | 18 | decision |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(x-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | rest=pr-2*(x-2) | 11 | statement |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2|10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | pr=2|10**5+3 | 3 | operation |
inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**5+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | inp=lambda:map(int,input().split())
n,m=inp()
pr=2*10**197+3
print(2,pr)
cnt=n-1
for i in range(n,2,-1):
print(1,i,2)
rest=pr-2*(n-2)
print(1,2,rest)
for i in range(2,n):
for j in range(i+1,n+1):
cnt+=1
if(cnt>m):
quit()
print(i,j,pr+3) | pr=2*10**197+3 | 3 | value |
n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers<F[i]):
print("YES")
exit(0)
print("NO") | if (Lovers<F[i]): | 7 | decision |
n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-22]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | Lovers=F[F[F[F[i]-1]-22]-1] | 6 | value |
n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]|1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | Lovers=F[F[F[F[i]-1]|1]-1] | 6 | operation |
n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]&1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | Lovers=F[F[F[F[i]-1]-1]&1] | 6 | operation |
n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]-1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | n=int(input())
F=list(map(int,input().split()))
Lovers=0
for i in range (n):
Lovers=F[F[F[F[i]-1]-1]>>1]
if (Lovers==F[i]):
print("YES")
exit(0)
print("NO") | Lovers=F[F[F[F[i]-1]-1]>>1] | 6 | operation |
t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]*1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | elif(l[l_c[i]*1]==1): | 26 | operation |
t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]|1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | elif(l[l_c[i]|1]==1 and i==0): | 22 | operation |
t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i>>1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | j_c.append(l[l_c[i>>1]:l_c[i]].count(0)) | 25 | operation |
t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i%1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | j_c.append(l[l_c[i%1]:l_c[i]].count(0)) | 25 | operation |
t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t==1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | t=int(input())
l=list(map(int,input().split()))
i_count=0
j_count=0
prev=0
prev_w=1
min_c=0
l_c=[]
if(t<1):
print("YES")
elif(t>1):
for i in range(1,t):
if(l[i]==l[i-1]):
p=0
elif(l[i]!=l[i-1]):
l_c.append(i)
l_c.append(i+1)
j_c=[]
for i in range(0,len(l_c)):
if(l[l_c[i]-1]==0 and i==0):
j_c.append(l[:l_c[i]].count(0))
elif(l[l_c[i]-1]==1 and i==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
elif(l[l_c[i]-1]==0):
j_c.append(l[l_c[i-1]:l_c[i]].count(0))
elif(l[l_c[i]-1]==1):
j_c.append(l[l_c[i-1]:l_c[i]].count(1))
if(min(j_c)==max(j_c)):
print('YES')
else:
print('NO') | if(t<1): | 9 | decision |
n,d=map(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=t:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
print(-1) | n,d=map(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=x:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
print(-1) | while s[i]!='1' and i!=x: | 10 | statement |
n,d=map(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=t:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
print(-1) | n,d=map(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=t:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
x(-1) | x(-1) | 17 | statement |
n,d=map(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=t:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
print(-1) | n,d=x(int,input().split())
s=input()
i,t=0,0
jumps=0
while i!=n-1:
i+=d
jumps+=1
if i>=n-1: break
t=i-d
while s[i]!='1' and i!=t:
i-=1
if i==t:
break
if i!=t:
print(jumps)
else:
print(-1) | n,d=x(int,input().split()) | 1 | statement |
m,n = [int(x) for x in input().split(' ')]
raw = list(input())
p = 0
cnt = 1
prt = 0
while p <m-n-1:
for j in range(n):
key = 0
if raw[p+n-j]=="1":
p = p+n-j
cnt+=1
key = 1
break
else:
pass
if key == 0:
prt = 1
break
if prt == 1:
print(-1)
else:
print(cnt) | m,n = [int(x) for x in input().split(' ')]
raw = list(input())
p = 0
cnt = 1
prt = 0
while p <m-n-1:
for j in range(n):
key = 0
if raw[p+n-j]=="1":
p = p+n-j
cnt+=1
key = 1
break
else:
pass
if key<0:
prt = 1
break
if prt == 1:
print(-1)
else:
print(cnt) | if key<0: | 16 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.