original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[130+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | if a[130+i]>a[j]: | 20 | value |
n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==110:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | if i%2==0 or i==110: | 6 | value |
n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-113]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | if conag[-113]=="Agasa": | 30 | value |
n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in range(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | n = int(input())
a = list(map(int, input().split()))
conag = []
a = a.sort(reverse=True)
for i in z(0, n):
if i%2==0 or i==0:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j] and a[0+i]!=a[j]:
del a[j]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Agasa')
break
elif i%2!=0 or i==1:
for j in range(0, n):
if a and len(a)>1:
if a[0+i]>a[j]:
del a[j]
conan.append(a[i])
del a[0+i]
if j==(n-1):
del a[0+i]
break
else:
conag.append('Conan')
break
if conag[-1]=="Agasa":
print("Conan")
else:
print(conag)
print("Agasa") | for i in z(0, n): | 5 | statement |
def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R<N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | if L == 1 and R<N: | 4 | decision |
def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS-L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | step = abs(POS-L) + 1 | 11 | operation |
def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L)^1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | step = abs(POS - L)^1 | 11 | operation |
def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS&L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | step = abs(POS&L) + 1 | 11 | operation |
def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS - L, R - POS)) + R - L + 2
print(step)
main() | def main():
N, POS, L, R = map(int, input().split())
if L == 1 and R == N:
print(0)
return
if L == 1:
step = abs(POS - R) + 1
elif R == N:
step = abs(POS - L) + 1
else:
step = abs(min(POS+L, R - POS)) + R - L + 2
print(step)
main() | step = abs(min(POS+L, R - POS)) + R - L + 2 | 13 | operation |
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(127,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63@i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(127,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | bits[63@i] = 1 | 9 | operation |
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(127,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(86,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | for i in range(86,-1,-1): | 33 | value |
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(127,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
z("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<=k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
break
ind += 1
if k!=sumBits:
for i in range(127,-1,-1):
if bits[i] != 0:
bits[i] -= 1
first = i + 1
break
if k - sumBits < 128 - first:
for i in range(first,k - sumBits + first):
bits[i] = 1
else:
for i in range(first,128):
bits[i] = 1
bits += [1]*(k - sumBits + first - 128)
bits[-1] = 2
print("Yes")
res = []
for i in range(len(bits)):
if bits[i] != 0:
res += [63-i]*bits[i]
print(*res) | z("No") | 13 | statement |
number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
print(c) | number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1<number:
c = 2
break
print(c) | elif bacterias + 1<number: | 10 | decision |
number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
print(c) | number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias&1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
print(c) | elif bacterias&1 != number: | 8 | operation |
number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
print(c) | number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
x(c) | x(c) | 13 | statement |
number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif bacterias + 1 == number:
c = 2
break
print(c) | number = int(input())
bacterias = 1
c = 1
while bacterias <= number:
if bacterias == 1:
bacterias = 2
c = 1
elif bacterias + 1 != number:
bacterias = bacterias * 2
elif z + 1 == number:
c = 2
break
print(c) | elif z + 1 == number: | 10 | statement |
import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]^1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | a+=[s[-1]^1] | 8 | operation |
import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-77]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | s=s[:-77] | 11 | value |
import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]<t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | while (len(s)!=0) and (s[-1]<t): | 10 | decision |
import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n/1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | s,t=[n/1],1 | 4 | operation |
import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]-1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | import sys
f=sys.stdin
n,k=map(int,f.readline().split())
s,t=[n+1],1
a=list(map(int,f.readline().split()))
for i in range(n):
if i>=k:
a+=[s[-1]//1]
s+=[a[i]]
while (len(s)!=0) and (s[-1]==t):
s=s[:-1]
t+=1
if len(s):
print('-1')
else:
for i in range(n):
print(a[i],end=' ') | a+=[s[-1]//1] | 8 | operation |
yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<98 :
need+=(-bul)
print(need) | if bul<98 : | 8 | value |
yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3//greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | bul-=breq*3//greq | 4 | operation |
yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul>0 :
need+=(-bul)
print(need) | if bul>0 : | 8 | decision |
yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2+greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | yel,bul=map(int,input().split())
yreq,greq,breq=map(int,input().split())
yel-=yreq*2@greq
bul-=breq*3+greq
need=0
if yel<0 :
need+=(-yel)
if bul<0 :
need+=(-bul)
print(need) | yel-=yreq*2@greq | 3 | operation |
import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a/2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | a=a/2*b | 7 | operation |
import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return z,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | return z,b | 13 | statement |
import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2<<a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | b=b-2<<a | 10 | operation |
import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a<0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | if a<0 or b==0: | 4 | decision |
import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2*b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | import sys
sys.setrecursionlimit(1000000)
def ans(a,b):
if a==0 or b==0:
return a,b
elif a>=2*b:
a=a-2%b
return ans(a,b)
elif b>=2*a:
b=b-2*a
return ans(a,b)
else:
return a,b
a,b=map(int,input().split())
tb1,tb2=ans(a,b)
print(tb1,tb2) | a=a-2%b | 7 | operation |
R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1<x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | if(x1<x2): | 6 | decision |
R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 92) | print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 92) | 12 | value |
R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2)//2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | dist = ((x1 - x2)//2 + (y1 - y2 ) ** 2) ** .5 | 2 | operation |
R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y**2))) ** .5 + y1 , (dist + R) / 2) | print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y**2))) ** .5 + y1 , (dist + R) / 2) | 12 | operation |
R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1 == x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | R , x1 , y1 , x2 , y2 = map(int , input().split())
dist = ((x1 - x2) ** 2 + (y1 - y2 ) ** 2) ** .5
if(dist >= R):
print(x1 , y1 , R)
exit()
if(x1<x2):
print(x1 , y1 - ((R - dist) / 2) , R / 2)
exit()
shib = (y2 - y1) / (x2 - x1)
z = (R - dist) / 2
y = shib
print(((z ** 2) / ((1 + y ** 2))) ** .5 + x1 , y * ((z ** 2) / ((1 + y ** 2))) ** .5 + y1 , (dist + R) / 2) | if(x1<x2): | 6 | decision |
if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i>=s:
count += 1
print(count) | if num % i == 0 and num / i>=s: | 9 | decision |
if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s+1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | for i in range(1, s+1): | 6 | operation |
if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 77:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if i > num + 77: | 7 | value |
if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s**1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | for i in range(1, s**1): | 6 | operation |
if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 0
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | if __name__ == '__main__':
arr = input().split()
s = int(arr[0])
num = int(arr[1])
count = 162
for i in range(1, s + 1):
if i > num + 1:
break
if num % i == 0 and num / i <= s:
count += 1
print(count) | count = 162 | 5 | value |
s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]<C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| if C[i]<C[i+1]: | 5 | decision |
s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]<C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| if C[i]<C[i+1]: | 5 | decision |
s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
z("-1")
| z("-1") | 11 | statement |
s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if y==p:
print(d)
else:
print("-1")
| if y==p: | 8 | statement |
s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]==C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| s=input()
p="abcdefghijklmnopqrstuvwxyz"
C=list(s)
for i in range(len(s)-1):
if C[i]<C[i+1]:
C[i+1]=p[i+1]
d="".join(C)
if d==p:
print(d)
else:
print("-1")
| if C[i]<C[i+1]: | 5 | decision |
n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])==d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | if (x[j]-x[i])==d: | 9 | decision |
n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])==d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | if (x[j]-x[i])==d: | 9 | decision |
n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])==d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | if (x[j]-x[i])==d: | 9 | decision |
n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)*i)
break
if ada==0: ans=min(ans,i)
print(ans) | ans=min(ans,(n-i)-(j-i)*i) | 11 | operation |
n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada==0: ans=min(ans,i)
print(ans) | n,d=[int(y) for y in input().split()]
x=[int(y) for y in input().split()]
x.sort()
ans=1000
ada=0
for i in range(0,n):
ada=0
for j in range(i+1,n):
if (x[j]-x[i])>d:
ada=1
ans=min(ans,(n-i)-(j-i)+i)
break
if ada<0: ans=min(ans,i)
print(ans) | if ada<0: ans=min(ans,i) | 13 | decision |
alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)] + ans[::-1])
exit()
print(-1) | alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)]&ans[::-1])
exit()
print(-1) | print(s[i + 1: len(s)]&ans[::-1]) | 13 | operation |
alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)] + ans[::-1])
exit()
print(-1) | alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i/1: len(s)] + ans[::-1])
exit()
print(-1) | print(s[i/1: len(s)] + ans[::-1]) | 13 | operation |
alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)] + ans[::-1])
exit()
print(-1) | alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i>>1: len(s)] + ans[::-1])
exit()
print(-1) | print(s[i>>1: len(s)] + ans[::-1]) | 13 | operation |
alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)] + ans[::-1])
exit()
print(-1) | alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 187: len(s)] + ans[::-1])
exit()
print(-1) | print(s[i + 187: len(s)] + ans[::-1]) | 13 | value |
alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)] + ans[::-1])
exit()
print(-1) | alph = ['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
s = input()
s = s[::-1]
index = 0
ans = ''
for i in range(len(s)):
if alph.index(s[i]) >= index:
ans += alph[index]
index += 1
else:
ans += s[i]
if index == 26:
print(s[i + 1: len(s)]//ans[::-1])
exit()
print(-1) | print(s[i + 1: len(s)]//ans[::-1]) | 13 | operation |
'''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]*n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter < 3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | '''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]/n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter < 3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | varr =[0]/n | 23 | operation |
'''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]*n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter < 3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | '''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]*n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter>3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | if (counter>3): | 33 | decision |
'''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]*n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter < 3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | '''
author sefat e mahadi
'''
class Node():
def __init__(self,index):
self.parent =None
self.ancestor =[]
self.end =1
self.index =index
narr =[]
n =int(input())
for i in range(n):
narr.append(Node(i))
for i in range(1,n):
par =int(input())-1
narr[i].parent =narr[par]
narr[par].ancestor.append(narr[i])
narr[par].end =0
'''
for i in range(n):
print (narr[i].end,narr[i].index)
'''
varr =[0]*n
def f(node):
if (node == None):
return
if (varr[node.index]):
return
counter =0
for a in node.ancestor:
if (a.end):
counter+=1
if (counter>3):
print ('No')
quit()
varr[node.index] =1
f(node.parent)
for node in narr:
if (node.end):
f(node.parent)
print ('Yes') | if (counter>3): | 33 | decision |
n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
x.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | x.append(str(len(g))) | 21 | statement |
n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k==n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | if j - k <= -1 and j + k==n - 1: | 11 | decision |
n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j|k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | elif j|k > n - 1: | 15 | operation |
n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k>=-1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | elif j - k>=-1: | 13 | decision |
n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e == 0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | n, k = input().split()
n, k = int(n), int(k)
a = [int(i) for i in input().split()]
b = []
for i in range(n):
e = a[i]
j = i
f = []
while 1:
g = []
if j - k <= -1 and j + k > n - 1:
f += range(n)
elif j - k <= -1:
f += range(j + k + 1)
elif j + k > n - 1:
f += range(j - k, n)
else:
f += range(j - k, j + k + 1)
g = list(set(f))
if e<0:
b.append(str(len(g)))
break
j = e-1
e = a[e-1]
print(' '.join(b)) | if e<0: | 20 | decision |
n=input()
vowels=['a','e','i','o','u','y']
word = input()
it=iter(word)
ans=""
for c in it:
if c in vowels:
while next(it) in vowels:
_=next(it)
ans=ans+c
print(ans) | n=input()
vowels=['a','e','i','o','u','y']
word = input()
it=iter(word)
ans=""
for c in it:
if c in vowels:
while next(it) in vowels:
_=next(it)
ans=ans@c
print(ans) | ans=ans@c | 10 | operation |
n=input()
vowels=['a','e','i','o','u','y']
word = input()
it=iter(word)
ans=""
for c in it:
if c in vowels:
while next(it) in vowels:
_=next(it)
ans=ans+c
print(ans) | n=input()
vowels=['a','e','i','o','u','y']
word = input()
it=iter(word)
ans=""
for c in it:
if c in vowels:
while next(it) in vowels:
_=next(it)
ans=ans%c
print(ans) | ans=ans%c | 10 | operation |
def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k*1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | ind = k*1 | 14 | operation |
def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k])>c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | if (n % A[k])>c: | 11 | decision |
def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n&A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | if (n&A[k]) < c: | 11 | operation |
def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n//A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | m = int(n//A[k]) | 13 | operation |
def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k]) < c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | def read2():
ent = input().split()
line = input().split()
return int(ent[0]), list(map(int, line))
def b(n, A):
m = 0
ind = 1
c = 10e7
for k in range(len(A)):
if (n % A[k])>c:
c = n % A[k]
m = int(n/A[k])
ind = k + 1
return ind, m
A = [2, 4, 5, 1, 3]
print(*b(*read2())) | if (n % A[k])>c: | 11 | decision |
import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 11)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | return math.sqrt((x - x2) ** 2 + (y - y2) ** 11) | 3 | value |
import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 40
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | rx = 40 | 18 | value |
import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny@cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | if (nx - cx) ** 2 + (ny@cy) ** 2 > r * r: | 36 | operation |
import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx)//dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | cos_alpha = abs(cx - nx)//dist(cx, cy, nx, ny) | 11 | operation |
import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
rx = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | import math
def dist(x, y, x2, y2):
return math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
r, cx, cy, nx, ny = map(float, input().split())
d = (dist(nx, ny, cx, cy) + r) / 2
if dist(cx, cy, nx, ny) != 0:
sin_alpha = abs(cy - ny) / dist(cx, cy, nx, ny)
cos_alpha = abs(cx - nx) / dist(cx, cy, nx, ny)
_y = d * sin_alpha
_x = d * cos_alpha
else:
print(cx - d, cy, d)
exit(0)
rx = 0
ry = 0
if nx < cx:
if ny < cy:
rx = nx + _x
ry = ny + _y
else:
rx = nx + _x
ry = ny - _y
else:
if ny < cy:
y = nx - _x
ry = ny + _y
else:
rx = nx - _x
ry = ny - _y
if (nx - cx) ** 2 + (ny - cy) ** 2 > r * r:
print(cx, cy, r)
else:
print(rx, ry, d) | y = nx - _x | 30 | statement |
n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s>B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | if (A*s>B): | 13 | decision |
n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x/r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | s=x/r | 11 | operation |
n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | n=int(input(""))
k=int(input(""))
A=int(x(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | A=int(x("")) | 3 | statement |
n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x==1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | while x==1: | 8 | decision |
n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k==0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | n=int(input(""))
k=int(input(""))
A=int(input(""))
B=int(input(""))
x=n
cost=0
while x>1:
if x%k<0:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
r=int(x%k)
if x==r:
x=x-(r-1)
cost=cost+(r-1)*A
else:
x=x-r
cost=cost+r*A
print(cost) | if x%k<0: | 9 | decision |
n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter>3:
print('No')
break
else:
print('Yes') | if counter>3: | 14 | decision |
n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter>3:
print('No')
break
else:
print('Yes') | if counter>3: | 14 | decision |
n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | n = int(input())
Parent = [[[], False] for i in range(n**1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | Parent = [[[], False] for i in range(n**1)] | 2 | operation |
n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter>3:
print('No')
break
else:
print('Yes') | if counter>3: | 14 | decision |
n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter < 3:
print('No')
break
else:
print('Yes') | n = int(input())
Parent = [[[], False] for i in range(n + 1)]
for index, i in enumerate(range(n - 1), start=2):
p = int(input())
Parent[p][0].append(index)
Parent[p][1] = True
for child_list, is_parent in Parent:
if is_parent:
counter = 0
for child in child_list:
if not Parent[child][1]:
counter += 1
if counter>3:
print('No')
break
else:
print('Yes') | if counter>3: | 14 | decision |
n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter<1:
print("Conan")
else:
print("Agasa")
counter *= -1 | if counter<1: | 16 | decision |
n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i//1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | while (i//1) <= len(myList): | 10 | operation |
n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i%1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | while (i%1) <= len(myList): | 10 | operation |
n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList)<0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | if len(myList)<0: | 15 | decision |
n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter == 1:
print("Conan")
else:
print("Agasa")
counter *= -1 | n = int(input())
myList = list(map(int, input().split()))
counter = 1
myList.sort()
myList.reverse()
while len(myList) != 0:
x = myList[0]
myList.pop(0)
i = 0
while (i + 1) <= len(myList):
if myList[i] < x:
myList.pop(i)
else:
i += 1
if len(myList) == 0:
if counter<1:
print("Conan")
else:
print("Agasa")
counter *= -1 | if counter<1: | 16 | decision |
l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans<<2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | r -= ans<<2 | 10 | operation |
l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l==0 or r>0 else 0)
print(ans) | ans += (1 if l==0 or r>0 else 0) | 12 | decision |
l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a>=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | elif r+a>=l: | 5 | decision |
l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l**a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | ans = (l**a)<<1 | 4 | operation |
l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l>0 or r>0 else 0)
print(ans) | l,r,a = map(int, input().strip().split())
ans = 0
if l+a<=r:
ans = (l+a)<<1
elif r+a<=l:
ans = (r+a)<<1
else:
ans = 2*min(l, r)
l -= ans//2
r -= ans//2
ans += 2*(a//2)
ans += (1 if l==0 or r>0 else 0)
print(ans) | ans += (1 if l==0 or r>0 else 0) | 12 | decision |
def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==x[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | if a[i]==x[i]: | 4 | statement |
def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]<b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | if a[i]<b[i]: | 4 | decision |
def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-182],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-182],n | 15 | value |
def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1%n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1%n))[::-1],n | 15 | operation |
def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]==b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | def xor(a,b):
o,l,a='',len(b),'0'*(len(b)-len(bin(a)[2:]))+bin(a)[2:]
for i in range(l):
if a[i]<b[i]:
o+='0'
else:
o+='1'
return(bti(o))
def bti(a):
o,c=0,len(a)-1
for i in a[::-1]:
o,c=o+int(i)*(2**c),c-1
return(o)
(n,k)=(map(int,input().split()))
m,m1=list('0'*(len(bin(n)[2:])-len(bin(i)[2:]))+bin(i)[2:] for i in range(1,1+n))[::-1],n
for i in range(k):
for j in range(i,n):
m1=max(m1,xor(m1,m[j]))
print(m1) | if a[i]<b[i]: | 4 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.