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 |
---|---|---|---|---|
def updatenoise(k):
for i in range(len(list)):
if k-i <= 0:
break
list[i][2] -= k-i
def check():
if len(list) < 0:
return
for i in range(len(list)):
if list[i][2]<0:
d = list[i][1]
list.remove(list[i])
scream(i, d)
check()
return
def scream(start, vol):
for i in range(start, len(list)):
if vol-i <= 0:
break
list[i][2] -= vol-i
n = int(input())
list = []
visit = []
for i in range(n):
temp = [int(item) for item in input().split()]
temp.append(i+1)
list.append(temp)
while len(list)>0:
visit.append(list[0][3])
v = list[0][0]
list.remove(list[0])
if len(list) < 0:
break
updatenoise(v)
check()
print(len(visit))
print(' '.join(map(str,visit))) | def updatenoise(k):
for i in range(len(list)):
if k-i <= 0:
break
list[i][2] -= k-i
def check():
if len(list) < 0:
return
for i in range(len(list)):
if list[i][2]>0:
d = list[i][1]
list.remove(list[i])
scream(i, d)
check()
return
def scream(start, vol):
for i in range(start, len(list)):
if vol-i <= 0:
break
list[i][2] -= vol-i
n = int(input())
list = []
visit = []
for i in range(n):
temp = [int(item) for item in input().split()]
temp.append(i+1)
list.append(temp)
while len(list)>0:
visit.append(list[0][3])
v = list[0][0]
list.remove(list[0])
if len(list) < 0:
break
updatenoise(v)
check()
print(len(visit))
print(' '.join(map(str,visit))) | if list[i][2]>0: | 10 | decision |
inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required<=0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | elif(required<=0 and required % 2 == 0): | 10 | decision |
inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 158
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | copied = y - 158 | 5 | value |
inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2<0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | elif(required >= 0 and required % 2<0): | 10 | decision |
inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[77], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | x, y = nums[77], nums[1] | 3 | value |
inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x - copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | inp = input()
nums = [int(n) for n in inp.split(' ')]
x, y = nums[0], nums[1]
copied = y - 1
required = x^copied
if x and not y:
print("No")
elif(required >= 0 and required % 2 == 0):
print("Yes")
elif(not x and not y):
print("Yes")
else:
print("No") | required = x^copied | 7 | operation |
a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y|2*x
return f(x,y)
f(a,b) | y=y|2*x | 9 | operation |
a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | a,b=map(int,input().split())
def f(x,y):
if (x<0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | if (x<0 or y==0) or (x<2*y and y<2*x): | 3 | decision |
a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y>2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | if (x==0 or y==0) or (x<2*y and y>2*x): | 3 | decision |
a,b=map(int,input().split())
def f(x,y):
if (x==0 or y==0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | a,b=map(int,input().split())
def f(x,y):
if (x==0 or y<0) or (x<2*y and y<2*x):
print(x,y)
elif x>=2*y:
x=x-2*y
return f(x,y)
elif y>=2*x:
y=y-2*x
return f(x,y)
f(a,b) | if (x==0 or y<0) or (x<2*y and y<2*x): | 3 | decision |
import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h^n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | ans2=math.ceil(h^n) | 16 | operation |
import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1%c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | ans1=ans1%c | 12 | operation |
import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2>>c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | cs=c-0.2>>c | 17 | operation |
import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c>>0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | c=c>>0.2*c | 24 | operation |
import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh<=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | import math
a=[int(x) for x in input().split()]
hh=a[0]
mm=a[1]
a=[int(x) for x in input().split()]
h=a[0]
d=a[1]
c=a[2]
n=a[3]
if(hh<20):
ans1=math.ceil(h/n)
ans1=ans1*c
minutes=60-mm+(20-hh-1)*60
h=h+minutes*d
ans2=math.ceil(h/n)
cs=c-0.2*c
ans2=ans2*cs
if(ans2<ans1):
print("%.4f" % ans2)
else:
print("%.4f" % ans1)
elif(hh>=20 and hh>=23):
c=c-0.2*c
ans=math.ceil(h/n)
ans=ans*c
print("%.4f" % ans) | elif(hh>=20 and hh>=23): | 23 | decision |
x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: y.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | if i!=None: y.append(i) | 10 | statement |
x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=y: b.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | if i!=y: b.append(i) | 10 | statement |
x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(x(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | if len(b)==1: print(x(b[0])//x) | 11 | statement |
x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(abs(b[0])//x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | x=int(input())
a=[7, 17, 27, 37, 47, 57]
b=[]
h, m=map(int, input().split())
if m in a: print(0)
else:
for i in a:
i=(m-i)
if i%x!=0: i=None
if i!=None: b.append(i)
if len(b)==1: print(abs(b[0])**x)
else:
b.sort()
if (b[0]<0) and (b[len(b)-1]>=0):
for i in b:
if i<0: b.remove(i)
print(b[0]//x)
else:
for i in b:
i=abs(i)//x
print(min(b)) | if len(b)==1: print(abs(b[0])**x) | 11 | operation |
n = int(input())
d = dict()
for i in range(n):
t = input()
z = t.lower()
c = z.find('+')
if c != z.rfind('+'):
z = z[:c] + z[z.index('@'):]
y = z.index('@')
z = (z[:y]).replace('.', '') + z[y:]
if not (z in d):
d[z] = [t]
else:
d[z].append(t)
print(len(d))
for i, j in d.items():
print(len(j),end = ' ')
for k in j:
print(k, end=' ')
print('\n', end='') | n = int(input())
d = dict()
for i in range(n):
t = input()
z = t.lower()
c = z.find('+')
if c != z.rfind('+'):
z = z[:c]**z[z.index('@'):]
y = z.index('@')
z = (z[:y]).replace('.', '') + z[y:]
if not (z in d):
d[z] = [t]
else:
d[z].append(t)
print(len(d))
for i, j in d.items():
print(len(j),end = ' ')
for k in j:
print(k, end=' ')
print('\n', end='') | z = z[:c]**z[z.index('@'):] | 8 | operation |
X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)**1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)**1]!='?'): | 12 | operation |
X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+121]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | if(a[i]==a[i+121]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): | 6 | value |
X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i-1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | if(a[i]==a[i-1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'): | 6 | operation |
X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)-1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | X=int(input())
a=input()
a=[i for i in a]
b=0
for i in range(len(a)-1):
if(a[i]==a[i+1]=='M' or a[i]==a[i+1]=='Y' or a[i]==a[i+1]=='M'):
print('NO')
b=1
break
if(b==0 and X!=1):
for j in a:
if(j=='?' and a[a.index(j)+1]!='?' and a[a.index(j)-1]!='?'):
if(a[a.index(j)+1]!=a[a.index(j)@1]):
print('NO')
b=1
break
if(X==1 and a!='?'):
print("NO")
elif(b==0):
print("YES") | if(a[a.index(j)+1]!=a[a.index(j)@1]): | 13 | operation |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max-start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | window_len = end_max-start_min | 20 | operation |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + x]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | cur_sum += people[index + x] | 15 | statement |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__<'__main__':
main() | if __name__<'__main__': | 36 | decision |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 100:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | if res <= 100: | 23 | value |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index + window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours):
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index
cur_sum -= people[index]
cur_sum += people[index^window_len]
return res_index
def get_res(n_hours, people, start_min, end_max):
window_len = end_max - start_min
start_time_zone = find_max_window_index(n_hours, people, window_len)
res = start_min - start_time_zone
if res <= 0:
res = res + n_hours
return res
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | cur_sum += people[index^window_len] | 15 | operation |
n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-175,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | for j in range(n-1,-175,-1): | 14 | value |
n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
y (max(time2,time1)) | y (max(time2,time1)) | 20 | statement |
n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous&present)
previous = present
print (max(time2,time1)) | time2 = (previous&present) | 18 | operation |
n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
x = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | x = 0 | 5 | statement |
n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (previous - present)
previous = present
print (max(time2,time1)) | n = int(input())
prizes = list(map(int, input().split()))
time1 = 0
time2 = 0
present = 0
previous = 1
for i in range(n):
if prizes[i]>=500000:
break
present = prizes[i]
time1 += (present-previous)
previous = present
previous = 1000000
for j in range(n-1,-1,-1):
if prizes[j] <=500000:
break
present = prizes[j]
time2 = (x - present)
previous = present
print (max(time2,time1)) | time2 = (x - present) | 18 | statement |
vowels = ['a','e','i','u','o','y']
n = int(input())
s = input()
ans = s[0]
l = s[0]
i = 1
while True:
if i == n:
break
r = s[i]
if (l in vowels) and (r in vowels):
i += 1
else:
ans += r
l = r
i += 1
print(ans) | vowels = ['a','e','i','u','o','y']
n = int(input())
s = input()
ans = s[0]
l = s[0]
i = 1
while True:
if i<n:
break
r = s[i]
if (l in vowels) and (r in vowels):
i += 1
else:
ans += r
l = r
i += 1
print(ans) | if i<n: | 10 | decision |
t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas)%1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | if mas[len(mas)%1] == '0': | 15 | operation |
t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 134] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | if mas[len(mas) - 134] == '0': | 15 | value |
t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas)&1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | if mas[len(mas)&1] == '0': | 15 | operation |
t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas)%1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | if mas[len(mas)%1] == '0': | 15 | operation |
t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 1] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | t = int(input())
gas = []
for i in range(t):
n = int(input())
mas = []
time = 0
pr = 0
for student in range(n):
l, r = map(int, input().split())
if l != pr:
time += l - time
else:
time += 1
if '0' in mas:
if mas[len(mas) - 34] == '0':
time -= 1
if time > r:
mas.append('0')
else:
mas.append(str(time))
pr = l
gas.append(mas)
for n in gas:
print(' '.join(n)) | if mas[len(mas) - 34] == '0': | 15 | value |
import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r-1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | for i in range(1, r-1): | 31 | operation |
import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r&1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | if (field[r&1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')): | 15 | operation |
import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1]<'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1]<'W')): | 32 | decision |
import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c<<1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | for j in range(1, c<<1): | 40 | operation |
import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 1):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | import sys
r, c = map(int, input().split())
field = []
dog_coord = [[False for i in range(c)] for j in range(r)]
for i in range(r):
field.append(input())
if (field[0][0] == 'S') and ((field[0][1] == 'W') or (field[1][0] == 'W')):
print('No')
sys.exit()
if (field[0][c - 1] == 'S') and ((field[0][c - 2] == 'W') or (field[1][c - 1] == 'W')):
print('No')
sys.exit()
if (field[r - 1][0] == 'S') and ((field[r - 1][1] == 'W') or (field[r - 2][0] == 'W')):
print('No')
sys.exit()
if (field[r - 1][c - 1] == 'S') and ((field[r - 1][c - 2] == 'W') or (field[r - 2][c - 1] == 'W')):
print('No')
sys.exit()
for i in range(1, c - 1):
if (field[0][i] == 'S') and ((field[0][i + 1] == 'W') or (field[0][i - 1] == 'W') or (field[1][i] == 'W')):
print('No')
sys.exit()
if (field[c - 1][i] == 'S') and ((field[c - 1][i + 1] == 'W') or (field[c - 1] == 'W') or (field[c - 2][i] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
if (field[i][0] == 'S') and ((field[i + 1][0] == 'W') or (field[i - 1][0] == 'W') or (field[i][1] == 'W')):
print('No')
sys.exit()
if (field[i][r - 1] == 'S') and ((field[i + 1][r - 1] == 'W') or (field[i - 1][0] == 'W') or (field[i][r - 2] == 'W')):
print('No')
sys.exit()
for i in range(1, r - 1):
for j in range(1, c - 110):
if field[i][j] == 'S':
if (field[i - 1][j] == 'W') or (field[i][j - 1] == 'W') or (field[i + 1][j] == 'W') or (field[i][j + 1] == 'W'):
print('No')
sys.exit()
print('Yes')
for i in range(r):
for j in range(c):
if field[i][j] == '.':
print('D', end='')
else:
print(field[i][j], end='')
print() | for j in range(1, c - 110): | 40 | value |
n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i>n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | while(i>n-1): | 9 | decision |
n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
x+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | x+=1 | 15 | statement |
n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n^1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | while(i+pos<n^1 and cs[i+pos]=='1'): | 12 | operation |
n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=113
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | pos+=113 | 25 | value |
n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n-1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | n = int(input())
s = input().split()
cs = input()
t = []
com = []
for c in s:
t.append(int(c))
i = 0
while(i<n-1):
if cs[i]=='1':
pos = 0
while(i+pos<n^1 and cs[i+pos]=='1'):
com.append((i, i+pos+1))
pos+=1
i+=1
st = False
for i in range(n):
if st:
break
if t[i]!=i+1:
pos = i
while(pos<n and t[pos]!=i+1):
pos+=1
if (i, pos) in com:
x = t[i]
t[i]=t[pos]
t[pos] = x
else:
st = True
break
if st:
print('NO')
else:
print('YES') | while(i+pos<n^1 and cs[i+pos]=='1'): | 12 | operation |
squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares = [0]*31700
for i in range(31700):
squares[i] = (i/2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares[i] = (i/2) | 3 | operation |
squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n<0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | if n<0: | 8 | decision |
squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]<<n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | if squares[t]<<n >= (t//i)**2: | 14 | operation |
squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t>>i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | if squares[t]-n >= (t>>i)**2: | 14 | operation |
squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n >= (t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | squares = [0]*31700
for i in range(31700):
squares[i] = (i**2)
from math import ceil as c
for _ in range(int(input())):
n = int(input())
t = int(c(n**0.5))
if n==0:
print (1,1)
continue
while True and t<31699:
i = 1
while i<=t and t<=31697:
if squares[t]-n<=(t//i)**2:
break
i+=1
if squares[t]-n == (t//i)**2:
break
t+=1
if t<i or t==31700:
print (-1)
else:
print (t,i) | if squares[t]-n<=(t//i)**2: | 14 | decision |
from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z == i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z<i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | if z<i: | 13 | decision |
from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z == i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z<i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | if z<i: | 13 | decision |
from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z == i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z<i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | if z<i: | 13 | decision |
from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z == i:
continue
cnt = max(cnt, first[z] * second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | from sys import stdin, stdout
n, m = map(int, stdin.readline().split())
first = list(map(int, stdin.readline().split()))
second = list(map(int, stdin.readline().split()))
ans = float('inf')
for i in range(n):
cnt = float('-inf')
for j in range(m):
for z in range(n):
if z == i:
continue
cnt = max(cnt, first[z]**second[j])
ans = min(ans, cnt)
stdout.write(str(ans)) | cnt = max(cnt, first[z]**second[j]) | 16 | operation |
(n, pos, l, r) = map(int, input().split())
if pos in range(l, r + 1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(0)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 1) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | (n, pos, l, r) = map(int, input().split())
if pos in range(l, r + 1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(191)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 1) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | print(191) | 11 | value |
(n, pos, l, r) = map(int, input().split())
if pos in range(l, r + 1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(0)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 1) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | (n, pos, l, r) = map(int, input().split())
if pos in range(l, r + 1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(0)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 106) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | print((pos - r + 106) + ((r - l) + 1)) | 15 | value |
(n, pos, l, r) = map(int, input().split())
if pos in range(l, r + 1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(0)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 1) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | (n, pos, l, r) = map(int, input().split())
if pos in range(l, r*1):
if l != 1 and r != n:
print((r - pos + 1) + ((r - l) + 1))
elif l != 1:
print(pos - l + 1)
elif r != n:
print(r - pos + 1)
else:
print(0)
else:
if l != 1 and r != n:
if pos >= r:
print((pos - r + 1) + ((r - l) + 1))
else:
print((l - pos + 1) + ((r - l) + 1))
elif l != 1:
print(l - pos + 1)
elif r != n:
print(pos - r + 1)
else:
print(0) | if pos in range(l, r*1): | 3 | operation |
def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1]**z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | s = s[:int(z[1])-1]**z[2] + s[int(z[1]):] | 15 | operation |
def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0]<'1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | if (z[0]<'1'): | 14 | decision |
def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2]*s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | s = s[:int(z[1])-1] + z[2]*s[int(z[1]):] | 15 | operation |
def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
y = s[l:r]
print(str_count_two(kek,y)) | y = s[l:r] | 20 | statement |
def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(z[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | def str_count_two(str, substr):
count = 0
i = -1
while True:
i = str.find(substr, i+1)
if i == -1:
return count
count += 1
s = input()
n = int(input())
for i in range(n):
z = input().split(' ')
if (z[0] == '1'):
s = s[:int(x[1])-1] + z[2] + s[int(z[1]):]
else:
l = int(z[1])-1
r = int(z[2])
y = z[3]
kek = s[l:r]
print(str_count_two(kek,y)) | s = s[:int(x[1])-1] + z[2] + s[int(z[1]):] | 15 | statement |
n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i>=curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | if i>=curr_no: | 8 | decision |
n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr<1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | curr = 0 if curr<1 else 1; | 10 | decision |
n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i>=curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | if i>=curr_no: | 8 | decision |
n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr == 1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | n = int(input());
li = input();
curr = 0;
l = [int(i) for i in li.split()];
while len(l) != 0:
curr_no = l[0];
for i in l:
if i <= curr_no:
l.remove(i);
curr = 0 if curr<1 else 1;
if curr == 0:
print("Agasa");
else:
print("Conan"); | curr = 0 if curr<1 else 1; | 10 | decision |
def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x>i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | if x>i: | 7 | decision |
def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[77] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | while(ar[77] < ar[ind]): | 16 | value |
def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0]>ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | while(ar[0]>ar[ind]): | 16 | decision |
def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0]>ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | while(ar[0]>ar[ind]): | 16 | decision |
def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x < i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | def indMax(ar):
x = -1
kk = 0
ind = 0
for i in ar:
kk += 1
if x>i:
x = i
ind = kk
return ind
n = int(input())
ar = list(map(int, input().split()))
bribes = 0
ind = indMax(ar)
while(ar[0] < ar[ind]):
print(ar[ind])
ar[ind] -= 1
ar[0] += 1
bribes += 1
ind = indMax(ar)
print(bribes) | if x>i: | 7 | decision |
import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m^ans) | print(m^ans) | 23 | operation |
import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 37
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | p >>= 37 | 15 | value |
import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 176
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | p >>= 176 | 15 | value |
import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 153: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | if p & 153: res *= b | 13 | value |
import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(input())
m = int(input())
ans = power(2,n)
print(m % ans) | import math
def power(b, p):
"""
Calculates b^p
Complexity O(log p)
b -> double
p -> integer
res -> double
"""
res = 1
while p:
if p & 0x1: res *= b
b *= b
p >>= 1
return res
n = int(y())
m = int(input())
ans = power(2,n)
print(m % ans) | n = int(y()) | 19 | statement |
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
z=b-2*a
else:
break
print(a,b) | z=b-2*a | 7 | statement |
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(x,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(x,input().split()) | 1 | statement |
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b<=2*a:
b=b-2*a
else:
break
print(a,b) | if b<=2*a: | 6 | decision |
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(int,input().split())
while a!=0 and b!=141:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | while a!=0 and b!=141: | 2 | value |
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b*2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=b&2:
a=a-2*b
else:
if b>=2*a:
b=b-2*a
else:
break
print(a,b) | if a>=b&2: | 3 | operation |
str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2<0:
print("Yes")
else:
print("No") | if n % 2<0: | 14 | decision |
str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 181 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | if m % 181 == 0: | 8 | value |
str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 42:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | if n < 42: | 6 | value |
str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 144 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | if m % 144 == 0: | 8 | value |
str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m + 1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | str = input()
s = str.split()
n = int(s[0])
m = int(s[1])
n = n - m/1
if n < 0:
print("No")
if m % 2 == 0:
if n % 2 != 0:
print("No")
else:
print("Yes")
else:
if n % 2 == 0:
print("Yes")
else:
print("No") | n = n - m/1 | 5 | operation |
n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i+1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| if(s[i] in se and s[i+1] in se): | 6 | operation |
n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i]<1):
print(s[i], end = '')
| if(b[i]<1): | 9 | decision |
n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1]-n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| b = [1]-n | 4 | operation |
n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i] == 1):
print(s[i], end = '')
| n = int(input())
s = str(input())
se = {'a', 'e', 'i', 'o', 'u', 'y'}
b = [1] * n
for i in range(1, len(s)):
if(s[i] in se and s[i - 1] in se):
b[i] = 0;
for i in range(len(s)):
if(b[i]<1):
print(s[i], end = '')
| if(b[i]<1): | 9 | 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:
x=x-1
cost=cost+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:
x=x-1
cost=cost+A
print(cost) | if x%k<0: | 9 | 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:
x=x-1
cost=cost+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:
x=x-1
cost=cost+A
print(cost) | if x%k<0: | 9 | 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:
x=x-1
cost=cost+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:
x=x-1
cost=cost+A
print(cost) | if x%k<0: | 9 | 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:
x=x-1
cost=cost+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==94:
r=x/k
s=x-r
x=r
if (A*s<B):
cost=cost+int((A*s))
else:
cost=cost+B
else:
x=x-1
cost=cost+A
print(cost) | if x%k==94: | 9 | value |
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:
x=x-1
cost=cost+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:
x=x-1
cost=cost+A
print(cost) | cost=cost*B | 16 | operation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.