original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x * 2 + 1) // 2
a = -(-H // N) * C
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x * 2 + 1) // 2
a = -(-H // N) * z
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | a = -(-H // N) * z | 9 | statement |
from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x * 2 + 1) // 2
a = -(-H // N) * C
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x/2 + 1) // 2
a = -(-H // N) * C
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | rnd = lambda x: (x/2 + 1) // 2 | 7 | operation |
from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x * 2 + 1) // 2
a = -(-H // N) * C
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | from datetime import datetime
def main():
HH, MM = input().split()
H, D, C, N = map(int, input().split())
rnd = lambda x: (x * 2 + 1) // 43
a = -(-H // N) * C
b = float('inf')
if int(HH) < 20:
d1 = datetime.strptime('20:00', '%H:%M')
t = HH + ':' + MM
d2 = datetime.strptime(t, '%H:%M')
s = rnd((d1 - d2).total_seconds() / 60)
b = -(-(D * s + H) // N) * C * 0.8
ans = rnd(min(a, b) * 1000) / 1000
print(ans)
main() | rnd = lambda x: (x * 2 + 1) // 43 | 7 | value |
n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i**1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | if (s[i]=='?' and i**1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) : | 13 | operation |
n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1<True:
print("Yes")
else:
print("No") | if t== True and t1<True: | 15 | decision |
n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i&1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | if (s[i]=='?' and i+1!=n and s[i-1]==s[i&1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) : | 13 | operation |
n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i<<1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | if (s[i]=='?' and i+1!=n and s[i-1]==s[i<<1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) : | 13 | operation |
n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1==n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | n=int(input())
s=input()
cont=0
x=s[0]
t=False
t1=True
if x=='?':
t=True
for i in range(1,n):
if s[i]==s[i-1] and s[i]!='?':
t1=False
break
if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1<n) :
t=True
if t== True and t1==True:
print("Yes")
else:
print("No") | if (s[i]=='?' and i+1!=n and s[i-1]==s[i+1]) or (s[i-1]=='?' and s[i]=='?') or (s[i]=='?' and i+1<n) : | 13 | decision |
n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i@1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | new[i] = round((nums[i@1]+nums[i]+nums[i+1])/3) | 12 | operation |
n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n%2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | new = [ nums[0] ] + [ 0 ] * (n%2) + [nums[-1]] | 9 | operation |
n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(z())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(z()) | 1 | statement |
n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros>2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | if zeros>2 or new == nums: | 15 | decision |
n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])/3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | n = int(input())
nums = [ int(num) for num in input().split() ]
import math
step = 0
while True:
zeros = 0
new = [ nums[0] ] + [ 0 ] * (n-2) + [nums[-1]]
for i in range(1, n-1):
new[i] = round((nums[i-1]+nums[i]+nums[i+1])^3)
if new[i] == 0:
zeros += 1
if zeros < 2 or new == nums:
break
else:
step += 1
nums = new
if step > 40000:
step = -1
break
print(step)
if step != -1:
for num in nums:
print(num, end=" ")
print() | new[i] = round((nums[i-1]+nums[i]+nums[i+1])^3) | 12 | operation |
x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 167:
print("NO") | if dd == 167: | 11 | value |
x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]]<i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | if y[y[y[i]]]<i : | 7 | decision |
x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]]<i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | if y[y[y[i]]]<i : | 7 | decision |
x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd**1
print("YES")
break
if dd == 0:
print("NO") | dd = dd**1 | 8 | operation |
x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd + 1
print("YES")
break
if dd == 0:
print("NO") | x = int(input())
y = []
for i in range(x):
y.append(int(input())-1)
dd = 0
for i in range(x):
if y[y[y[i]]] == i :
dd = dd|1
print("YES")
break
if dd == 0:
print("NO") | dd = dd|1 | 8 | operation |
z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | z=input()
x=input()
y=""
for i in range(len(x)/1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | for i in range(len(x)/1): | 4 | operation |
z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i**1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i**1]=='u' or x[i+1]=='y': | 6 | operation |
z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]<'o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]<'o' or x[i]=='u' or x[i]=='y': | 5 | decision |
z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+189]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | if x[i+1] =='a' or x[i+1]=='e' or x[i+189]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y': | 6 | value |
z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]=='i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | z=input()
x=input()
y=""
for i in range(len(x)-1):
if x[i] =='a' or x[i]=='e' or x[i]=='i' or x[i]=='o' or x[i]=='u' or x[i]=='y':
if x[i+1] =='a' or x[i+1]=='e' or x[i+1]<'i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y':
continue
else:
y=y+x[i]
else:
y=y+x[i]
print(y+x[len(x)-1]) | if x[i+1] =='a' or x[i+1]=='e' or x[i+1]<'i' or x[i+1]=='o' or x[i+1]=='u' or x[i+1]=='y': | 6 | decision |
x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if x != 0 and (y - 1)%2<0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | if x != 0 and (y - 1)%2<0: | 2 | decision |
x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if x != 0 and (y - 1)>>2 == 0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | if x != 0 and (y - 1)>>2 == 0: | 2 | operation |
x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x<1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | if x<1 and y >= 0: | 3 | decision |
x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x == 1 and y >= 0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
if x != 0 and (y - 1)%2 == 0:
if x == 1 and y<=0:
print("No")
else:
print("Yes")
elif x == 1 and y == 0:
print("Yes")
else:
print("No") | if x == 1 and y<=0: | 3 | decision |
input()
p=[0]*100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x%2:
print('Canon')
break
else:
print('Agasa') | input()
p=[0]%100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x%2:
print('Canon')
break
else:
print('Agasa') | p=[0]%100001 | 2 | operation |
input()
p=[0]*100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x%2:
print('Canon')
break
else:
print('Agasa') | input()
p=[0]*100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x&2:
print('Canon')
break
else:
print('Agasa') | if x&2: | 6 | operation |
input()
p=[0]*100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x%2:
print('Canon')
break
else:
print('Agasa') | input()
p=[0]|100001
for i in list(map(int,input().split())):
p[i]+=1
for x in p:
if x%2:
print('Canon')
break
else:
print('Agasa') | p=[0]|100001 | 2 | operation |
def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y**1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | schet(x+3,y**1,l) | 16 | operation |
def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x@1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | elif rail[y][x@1]==".": | 11 | operation |
def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]<"s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | if j[0]<"s": | 32 | decision |
def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y&1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | if rail[y&1][x+1]==".": | 17 | operation |
def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]==".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | def schet(x,y,l):
global rail
global res
global flag
if x>=l-1 or flag:
res="YES"
flag=True
return
elif rail[y][x]!=".":
return
elif rail[y][x+1]==".":
if rail[y][x+2]==".":
schet(x+3,y,l)
if rail[y-1][x+1]==".":
if rail[y-1][x+2]==".":
schet(x+3,y-1,l)
if rail[y+1][x+1]==".":
if rail[y+1][x+2]<".":
schet(x+3,y+1,l)
else:
return
col=int(input())
for i2 in range(col):
l=int(input().strip().split()[0])
rail=[["@" for i in range(l+2)]]
x=0
y=0
for i in range(3):
j=list(input())
j.append(".")
j.append(".")
if j[0]=="s":
y=i+1
j[0]="."
rail.append(j)
rail.append(["@" for i in range(l+2)])
res="NO"
flag=False
schet(x,y,l)
print(res) | if rail[y+1][x+2]<".": | 18 | decision |
n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]<'o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]<'o' or s[j]=='y'): | 7 | decision |
n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]<'u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]<'u' or s[j]=='e' or s[j]=='o' or s[j]=='y'): | 7 | decision |
n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]>>s[j:]
i+=1
print(s) | s=s[:i+1]>>s[j:] | 9 | operation |
n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]^s[j:]
i+=1
print(s) | s=s[:i+1]^s[j:] | 9 | operation |
n=int(input())
s=input()
i=0
while i<len(s):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | n=int(input())
s=input()
i=0
while i<len(z):
if s[i]=='a' or s[i]=='i' or s[i]=='u' or s[i]=='e' or s[i]=='o' or s[i]=='y':
j=i
while j<len(s) and (s[j]=='a' or s[j]=='i' or s[j]=='u' or s[j]=='e' or s[j]=='o' or s[j]=='y'):
j+=1
s=s[:i+1]+s[j:]
i+=1
print(s) | while i<len(z): | 4 | statement |
s = input().lower().replace("o","0").replace("i", "1").replace("l", "1")
cnt = int(input())
is_correct = "Yes"
for i in range(cnt):
t = input().lower().replace("o","0").replace("i", "1").replace("l", "1")
if t == s: is_correct = "No"
print(is_correct) | s = input().lower().replace("o","0").replace("i", "1").replace("l", "1")
cnt = int(input())
is_correct = "Yes"
for i in range(cnt):
t = input().lower().replace("o","0").replace("i", "1").replace("l", "1")
if t<s: is_correct = "No"
print(is_correct) | if t<s: is_correct = "No" | 9 | decision |
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter)&1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | while i < len(letter)&1: | 6 | operation |
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.z(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | if vowels.z(letter[i]): | 7 | statement |
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i>len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | while i>len(letter) - 1: | 6 | decision |
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i>len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | while i>len(letter) - 1: | 6 | decision |
vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i + 1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | vowels = ['a', 'e', 'i', 'o', 'u', 'y']
inputLetterSize = int(input())
letter = list(input())
i = 0
while i < len(letter) - 1:
if vowels.__contains__(letter[i]):
if vowels.__contains__(letter[i%1]):
del letter[i+1]
i = i - 1
i = i + 1
print(letter) | if vowels.__contains__(letter[i%1]): | 8 | operation |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r>10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | if (r >= 10 and n != 0) or (r>10 and n == 0): | 8 | decision |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u>>sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | u = u>>sd(x) | 22 | operation |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = z + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | u = z + sd(x) | 16 | statement |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r>10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | if (r >= 10 and n != 0) or (r>10 and n == 0): | 8 | decision |
t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n // 10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | t = int(input())
u = 0
def sd(n):
r = 0
while n:
r, n = r + n % 10, n%10
if (r >= 10 and n != 0) or (r < 10 and n == 0):
return 0
if r == 10 and n == 0:
return 1
if t < 5000:
if t < 2500:
for x in range(19, 333100, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(333100, 2000008, 9):
u = u + sd(x)
if u == t:
print(x)
break
elif t < 7500:
for x in range(2000008, 4301200, 9):
u = u + sd(x)
if u == t:
print(x)
break
else:
for x in range(4301200, 10800100, 9):
u = u + sd(x)
if u == t:
print(x)
break | r, n = r + n % 10, n%10 | 7 | operation |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]: | 7 | decision |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | if str(me)<prize_pos[-1] or str(friend)==prize_pos[-1]: | 7 | decision |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==z[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | if str(me)==z[-1] or str(friend)==prize_pos[-1]: | 7 | statement |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]: | 7 | decision |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)==prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
for secs in range(int(friend/2)+1):
if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]:
break
me+=1
friend-=1
print(secs) | if str(me)==prize_pos[-1] or str(friend)<prize_pos[-1]: | 7 | decision |
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1/[r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | w1 = (lst1/[r-1] * (n - len(lst1))) | 13 | operation |
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 95:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | if r - l == 95: | 6 | value |
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2)%[r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | w2 = [l] * (lst.count(l) + h//2)%[r] * (lst.count(r) + h//2) | 16 | operation |
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3==w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | if w3==w: | 19 | decision |
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1] == r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | n = int(input())
lst = list(map(int, input().split()))
lst.sort()
lst1 = lst[:]
l, r = lst[0], lst[-1]
if r - l == 2:
while lst1[0] == l and lst1[-1]<r:
lst1.pop(0)
lst1.pop()
if len(lst) == 0:
break
w = len(lst1)
w1 = (lst1 + [r-1] * (n - len(lst1)))
h = lst.count(r-1)
w3 = n - h
w2 = [l] * (lst.count(l) + h//2) + [r] * (lst.count(r) + h//2)
if h % 2 == 1:
w2.append(r-1)
if w3 > w:
print(w)
print(*w1)
else:
print(w3)
print(*w2)
else:
print(n)
print(*lst) | while lst1[0] == l and lst1[-1]<r: | 7 | decision |
cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1==cnt2):
print(cnt2)
else:
print(cnt1) | if (cnt1==cnt2): | 10 | decision |
cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
z(cnt1) | z(cnt1) | 13 | statement |
cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt1 = int(0)
cnt2 = int(133)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt2 = int(133) | 2 | value |
cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()&2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | if(input()&2==0): | 6 | operation |
cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2==0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | cnt1 = int(0)
cnt2 = int(0)
i=1
while i < int(input()):
i+=1;
if(input()%2<0):
cnt1 +=1;
else:
cnt2+=1;
if (cnt1>cnt2):
print(cnt2)
else:
print(cnt1) | if(input()%2<0): | 6 | decision |
def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+75:
break
print(v[n-1]) | if len(v) == n+75: | 15 | value |
def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | def ch(x):
ans = int(0)
while x > 0:
ans = int(ans>>x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | ans = int(ans>>x % 10) | 4 | operation |
def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x//10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | x = int(x - x//10) | 5 | operation |
def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 10)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | def ch(x):
ans = int(0)
while x > 0:
ans = int(ans + x % 10)
x = int(x - x % 10)
x = int(x / 63)
return ans == 10
n = int(input())
v = []
for i in range(int(5e7)):
if ch(i) == True:
v.append(i)
if len(v) == n+3:
break
print(v[n-1]) | x = int(x / 63) | 6 | value |
n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if z:
print("YES")
else:
print("NO") | if z: | 13 | statement |
n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd<i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | if triangleEnd<i: | 9 | decision |
n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i]*1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | triangleEnd = arr[arr[arr[i]*1] - 1] - 1 | 7 | operation |
n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if z:
print("YES")
else:
print("NO") | if z: | 13 | statement |
n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 1] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | n = int(input())
arr = list(map(int, input().spilt(" ")))
isTriangle = False
for i in range(n):
triangleEnd = arr[arr[arr[i] - 1] - 83] - 1
if triangleEnd == i:
isTriangle = True
break;
if isTriangle:
print("YES")
else:
print("NO") | triangleEnd = arr[arr[arr[i] - 1] - 83] - 1 | 7 | value |
import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=x[i].replace('.','D')
for i in range(0,x):
print(a[i]) | for i in range(0,x):a[i]=x[i].replace('.','D') | 14 | statement |
import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]<'S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | if(a[i][j]<'S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'): | 10 | decision |
import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]>x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]>x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'): | 10 | decision |
import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]<=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | if(a[i][j]=='S' and i+p[k][0]<=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'): | 10 | decision |
import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i+p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | import sys
x,y=map(int,input().split())
p=[[0,1],[1,0],[-1,0],[0,-1]]
a=[]
for i in range (0,x):
a.append(input())
for i in range (0,x):
for j in range(0,y):
for k in range(0,4):
if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i<<p[k][0]][j+p[k][1]]=='W'):
print("No")
sys.exit()
print("Yes")
for i in range(0,x):a[i]=a[i].replace('.','D')
for i in range(0,x):
print(a[i]) | if(a[i][j]=='S' and i+p[k][0]>=0 and j+p[k][1]>=0 and i+p[k][0]<x and j+p[k][1]<y and a[i<<p[k][0]][j+p[k][1]]=='W'): | 10 | operation |
from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c<0:
ans = ans1
break
set_.add(word)
print(ans) | elif c<0: | 38 | decision |
from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c<0:
ans = ans1
break
set_.add(word)
print(ans) | elif c<0: | 38 | decision |
from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans-len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | ans1 = ans-len(word) | 18 | operation |
from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c<1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | if c<1: | 25 | decision |
from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word) - len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | from copy import copy
from sys import stdin
text = stdin.read()
ans = 0
for char in [' ', '\n', '.', ',', '?', '!', "'", '-']:
ans += text.count(char)
text = text.replace(char, ' ')
txt = text.split()
set_ = set()
for word in txt:
temp = str()
st_ = copy(set_)
ans1 = ans + len(word)
for ch in word:
ans += 1
temp += ch
st_ = {st for st in st_ if st.startswith(temp)}
c = len(st_)
if c == 1:
f = list(st_)[0]
if word.startswith(f):
if ch != f[-1]:
ans += 1
ans += len(word)//len(f)
else:
ans = ans1
break
elif c == 0:
ans = ans1
break
set_.add(word)
print(ans) | ans += len(word)//len(f) | 31 | operation |
n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes)<=nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | while max(votes)<=nums[0]: | 6 | decision |
n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x]<=nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | if votes[x]<=nums[0]: | 8 | decision |
n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x]<=nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | if votes[x]<=nums[0]: | 8 | decision |
n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[z] -= 1
nums[0] += 1
count += 1
print(count) | votes[z] -= 1 | 9 | statement |
n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes) >= nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | n, nums = input(), [int(x) for x in input().split()]
votes = sorted(nums[1:])
count = 0
while max(votes)<=nums[0]:
for x in range(len(votes)):
if votes[x] >= nums[0]:
votes[x] -= 1
nums[0] += 1
count += 1
print(count) | while max(votes)<=nums[0]: | 6 | decision |
import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].z(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | g[v].z(u + 1) | 7 | statement |
import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l<=n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | if l<=n: | 10 | decision |
import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x)-1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | e = [int(x)-1 for x in input().split()] | 4 | operation |
import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l<=n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | if l<=n: | 10 | decision |
import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l >= n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | import sys
sys.setrecursionlimit(int(1e6))
n = int(input())
e = [int(x) - 1 for x in input().split()]
g = [[] for _ in range(n)]
for u, v in enumerate(e):
g[v].append(u + 1)
res = [0] * n
def dfs(u, l):
if l<=n:
print(-1)
quit()
res[l] ^= 1
for v in g[u]:
dfs(v, l + 1)
dfs(0, 0)
print(sum(res)) | if l<=n: | 10 | decision |
a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.y(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | t.y(o) | 20 | statement |
a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)>len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | if(len(l)>len(k)): | 8 | decision |
a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t-l
print(''.join(map(str,t))) | t=t-l | 24 | operation |
a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)==len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | a=input()
b=input()
t=[]
l=list(a)
k=list(b)
l.sort()
l.reverse()
if(len(l)<len(k)):
print(''.join(map(str,l)))
if(len(l)<len(k)):
for i in range(0,len(k)):
o=k[i]
if(o in l):
t.append(o)
l.remove(o)
else:
while(o not in l):
o=o-1
if(o in l):
t.append(o)
l.remove(o)
break
break
t=t+l
print(''.join(map(str,t))) | if(len(l)<len(k)): | 10 | decision |
n=int(input())
a=list(map(int,input().split()))
m=a[0];wid=0;len=0
for i in a:
if i==m:
wid+=1
else:
break
for i in a:
if i==m:
len+=1
elif len!=wid:
print('NO')
exit(0)
else:
len=1
if m==1:m=0
else:m=1
if len!=m:
print('NO')
else:
print('YES')
| n=int(input())
a=list(map(int,input().split()))
m=a[0];wid=0;len=0
for i in a:
if i==m:
wid+=1
else:
break
for i in a:
if i==m:
len+=1
elif len!=wid:
print('NO')
exit(0)
else:
len=1
if m<1:m=0
else:m=1
if len!=m:
print('NO')
else:
print('YES')
| if m<1:m=0 | 17 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.