original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i>>per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i>>per] != cycle[0:per // 2]): | 20 | operation |
n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 32
if not f:
print("NO")
else: print("YES") | cnt += 32 | 23 | value |
n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | n = int(input())
s = list(input().split())
s = ''.join(z)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | s = ''.join(z) | 3 | statement |
n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i + per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | n = int(input())
s = list(input().split())
s = ''.join(s)
start = s[0]
ind = 0
x = 0
for i in range(1, n):
if s[i] == str(1 - int(start)): x = 1
if x and s[i] == start: break
cycle = s[0:i]
if cycle.count('1') != cycle.count('0'):
print("NO")
else:
per = len(cycle)
st = i
cnt = 0
f = 1
for i in range(st, n, per):
ln = len(s[i:i-per])
if (not (ln == per or ln == per // 2)) and (s[i:i + per] != cycle[0:per] or s[i:i + per] != cycle[0:per // 2]):
f = 0
break
cnt += 1
if not f:
print("NO")
else: print("YES") | ln = len(s[i:i-per]) | 19 | operation |
a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a) < len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a)>len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | if len(a)>len(b): | 4 | decision |
a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a) < len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a)>len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | if len(a)>len(b): | 4 | decision |
a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a) < len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a) < len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i%1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | if b[i-1] > x[i%1]: | 22 | operation |
a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a) < len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | a = list(map(int,input()))
b = list(map(int,input()))
x = []
if len(a)>len(b):
a.sort(reverse=True)
ans = ""
for i in a:
ans += str(i)
print(ans)
t = b[0]
while True:
if t in a:
x.append(t)
a.remove(t)
break
t -= 1
n = len(b)
for i in range(1,n):
j = b[i]
if b[i-1] > x[i-1]:
a.sort(reverse=True)
x += a
break
while True:
if j in a :
x.append(j)
a.remove(j)
break
j-=1
ans = ""
for i in x:
ans += str(i)
print(ans) | if len(a)>len(b): | 4 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j<0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | if j<0: | 8 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[y+1]-a[j]+2)//2)
print(ans) | ans=max(ans,(a[y+1]-a[j]+2)//2) | 15 | statement |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j<0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | if j<0: | 8 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)&2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | ans=max(ans,(a[j]-a[j-1]+2)&2) | 11 | operation |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j==k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=input().split()
a=list(map(int,a))
ans=0
for j in range(k):
if j==0:
ans=max(ans,a[j])
else:
ans=max(ans,(a[j]-a[j-1]+2)//2)
if j<k-1:
ans=max(ans,n-a[j]+1)
else:
ans=max(ans,(a[j+1]-a[j]+2)//2)
print(ans) | if j<k-1: | 12 | decision |
import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter] > 0:
num_seen += 1
if num_seen == 4:
print("Yes")
else:
if num_seen == 2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter] > 0:
num_seen += 1
if num_seen == 4:
print("Yes")
else:
if num_seen<2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | if num_seen<2: | 22 | decision |
import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter] > 0:
num_seen += 1
if num_seen == 4:
print("Yes")
else:
if num_seen == 2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter] > 0:
num_seen += 1
if num_seen == 150:
print("Yes")
else:
if num_seen == 2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | if num_seen == 150: | 19 | value |
import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter] > 0:
num_seen += 1
if num_seen == 4:
print("Yes")
else:
if num_seen == 2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | import numpy as np
s = input()
letters = "abcdefghijklmnopqrstuvwxyz"
hist = {}
for letter in letters:
hist[letter] = 0
for letter in s:
hist[letter] += 1
num_seen = 0
for letter in letters:
if hist[letter]==0:
num_seen += 1
if num_seen == 4:
print("Yes")
else:
if num_seen == 2:
flag = True
for letter in letters:
if hist[letter] == 1:
flag = False
if flag:
print("Yes")
else:
print("No")
else:
if num_seen == 3:
num_1 = 0
for letter in letters:
if hist[letter] == 1:
num_1 += 1
if num_1 < 3:
print("Yes")
else:
print("No")
else:
print("No") | if hist[letter]==0: | 15 | decision |
s = input()
a = list(set(s))
if len(a) == 1 or len(a) >= 4:
print('No')
else:
if len(a) == 2:
l1 = s.count(a[0])
l2 = s.count(a[1])
if l1 == 1 and l2 != 1:
print('No')
elif l1 != 1 and l2 == 1:
print('No')
else:
print('Yes')
else:
print('Yes') | s = input()
a = list(set(s))
if len(a) == 1 or len(a) >= 4:
print('No')
else:
if len(a) == 2:
l1 = s.count(a[0])
l2 = s.count(a[1])
if l1<1 and l2 != 1:
print('No')
elif l1 != 1 and l2 == 1:
print('No')
else:
print('Yes')
else:
print('Yes') | if l1<1 and l2 != 1: | 9 | decision |
n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count>3:
print('No')
exit(0)
print('Yes') | if count>3: | 14 | decision |
n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | n=int(input())
d={1:[]}
for i in range(n>>1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | for i in range(n>>1): | 3 | operation |
n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[z].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | d[z].append(i+2) | 6 | statement |
n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i+2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | n=int(input())
d={1:[]}
for i in range(n-1):
parent=int(input())
if parent in d:
d[parent].append(i@2)
else:
d[parent]=[i+2]
for i in d:
count=0
for j in d[i]:
if j not in d:
count+=1
if count<3:
print('No')
exit(0)
print('Yes') | d[parent].append(i@2) | 6 | operation |
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)):
print(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)):
list[i][2] -= vol
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)):
print(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)):
list[i][2] -= vol
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))) | list[i][2] -= k&i | 5 | operation |
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)):
print(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)):
list[i][2] -= vol
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
x[i][2] -= k-i
def check():
if len(list) < 0:
return
for i in range(len(list)):
print(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)):
list[i][2] -= vol
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))) | x[i][2] -= k-i | 5 | statement |
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)):
print(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)):
list[i][2] -= vol
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)):
print(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)):
list[i][83] -= vol
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))) | list[i][83] -= vol | 20 | value |
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)):
print(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)):
list[i][2] -= vol
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)):
print(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)):
list[i][2] -= vol
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))) | temp.append(i>>1) | 27 | operation |
a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | a=x(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | a=x(input()) | 1 | statement |
a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i<a+1):
print(b%(2**a)) | elif(i<a+1): | 10 | decision |
a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=161
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | sum*=161 | 6 | value |
a=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | z=int(input())
b=int(input())
i=1
sum=1
while(i<=a and sum<b):
sum*=2
i+=1
if(i<a):
print(b)
elif(i==a+1):
print(b%(2**a)) | z=int(input()) | 1 | statement |
n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k<1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | if k<1: | 6 | decision |
n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k<1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | if k<1: | 6 | decision |
n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(155) | exit(155) | 24 | value |
n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-1):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | n,k = map(int,input().split(" "))
s = list(input())
s1 = s[:]
s2 = sorted(list(set(s)))
if k == 1:
for ch in s2:
if s1[0] < ch:
print(ch)
exit(0)
if n < k:
s1.extend([s2[0]]*(k-n))
t = "".join(s1)
print(t)
else:
for i in range(k-1,-1,-100):
if s1[i] != s2[-1]:
ans = s1[:i]
ans.append(s2[s2.index(s1[i])+1])
ans.extend([s2[0]]*(k-i-1))
print("".join(ans))
exit(0) | for i in range(k-1,-1,-100): | 18 | value |
hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)<<int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | residu = int(hamsters) - (int(hamsters)<<int(box[i]))*int(box[i]) | 5 | operation |
hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)<<int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | residu = int(hamsters) - (int(hamsters)<<int(box[i]))*int(box[i]) | 5 | operation |
hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+46)
print(boxnummer, aantalboxes) | boxnummer=int(i+46) | 9 | value |
hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))+int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | residu = int(hamsters) - (int(hamsters)//int(box[i]))+int(box[i]) | 5 | operation |
hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))*int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | hamsters, k=input().split()
box=[int(i) for i in input().split()]
min_over=9999
for i in range(0,int(k)):
residu = int(hamsters) - (int(hamsters)//int(box[i]))/int(box[i])
if residu<min_over:
min_over=residu
aantalboxes=int(hamsters)//int(box[i])
boxnummer=int(i+1)
print(boxnummer, aantalboxes) | residu = int(hamsters) - (int(hamsters)//int(box[i]))/int(box[i]) | 5 | operation |
def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r + 1):
if g(j) == k:
counter += 1
print(counter) | def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r|1):
if g(j) == k:
counter += 1
print(counter) | for j in range(l, r|1): | 23 | operation |
def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r + 1):
if g(j) == k:
counter += 1
print(counter) | def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r^1):
if g(j) == k:
counter += 1
print(counter) | for j in range(l, r^1): | 23 | operation |
def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r + 1):
if g(j) == k:
counter += 1
print(counter) | def f(n):
st = str(n)
d = 1
for i in st:
if i != '0':
d *= int(i)
return d
def g(n):
while n >= 10 :
n = f(n)
return n
number = int(input())
for i in range(number):
counter = 0
s = input().split(" ")
l = int(s[0])
r = int(s[1])
k = int(s[2])
for j in range(l, r>>1):
if g(j) == k:
counter += 1
print(counter) | for j in range(l, r>>1): | 23 | operation |
import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter>arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | if letter>arrayB[i] and letter>tempMax: | 33 | decision |
import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter>arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | if letter>arrayB[i] and letter>tempMax: | 45 | decision |
import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i>len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | while i>len(arrayB)-1: | 21 | decision |
import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | import math
from sys import stdin
a=stdin.readline()
b=stdin.readline()
arrayA=[]
arrayB=[]
for letter in a:
if letter!='\n':
arrayA.append(int(letter))
for letter in b:
if letter!='\n':
arrayB.append(int(letter))
output=[]
if len(arrayB)>len(arrayA):
arrayA=sorted(arrayA,reverse=True)
else:
i=0
while i < len(arrayB)-1:
if arrayB[i] in arrayA[i::]:
idx=arrayA[i::].index(arrayB[i])+i
temp=arrayA[idx]
arrayA[idx]=arrayA[i]
arrayA[i]=temp
arrayA[i+1::]=sorted(arrayA[i+1::])
if arrayA[i+1:] > arrayB[i+1:]:
tempMax=arrayA[i+1]
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA[i::].index(tempMax)+i
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i+1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
elif arrayB[i] not in arrayA[i::]:
tempMax=0
for letter in arrayA[i::]:
if letter<arrayB[i] and letter>tempMax:
tempMax=letter
idx=arrayA.index(tempMax)
arrayA[idx]=arrayA[i]
arrayA[i]=tempMax
arrayA[i/1::]=sorted(arrayA[i+1::],reverse=True)
i=len(arrayA)
i+=1
value=0
for i in range(len(arrayA)):
value+=arrayA[i]*(10**(len(arrayA)-1-i))
print(value) | arrayA[i/1::]=sorted(arrayA[i+1::],reverse=True) | 52 | operation |
t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t==1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | while t==1: | 12 | decision |
t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)<10:
t=t-1
print(first) | if add_num(first)<10: | 15 | decision |
t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>109:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | while t>109: | 12 | value |
t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==151:
t=t-1
print(first) | if add_num(first)==151: | 15 | value |
t=int(input())
def add_num(a):
ans=0
while a:
ans=s+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | t=int(input())
def add_num(a):
ans=0
while a:
ans=x+a%10
a=a//10
return ans
first=19
while t>1:
first=first+9
if add_num(first)==10:
t=t-1
print(first) | ans=x+a%10 | 7 | statement |
x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x>>1:
print('No')
else:
print('Yes') | if x < 0 or x>>1: | 10 | operation |
x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | x, y = map(int, input().split())
y -= 1
if y<<1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | if y<<1: | 3 | operation |
x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 73 or x & 1:
print('No')
else:
print('Yes') | if x < 73 or x & 1: | 10 | value |
x, y = map(int, input().split())
y -= 1
if y & 1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | x, y = map(int, input().split())
y -= 1
if y-1:
print('No')
else:
if x != 0 and y == 0:
print('No')
exit(0)
x -= y
if x < 0 or x & 1:
print('No')
else:
print('Yes') | if y-1: | 3 | operation |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(y-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| print(y-l+1) | 7 | statement |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(z*2+m+2)
| print(z*2+m+2) | 14 | statement |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l<1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| elif l<1: | 4 | decision |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-x,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| m=max(r-x,pos-l) | 9 | statement |
n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=min(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n,pos,l,r=map(int,input().split())
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
m=max(r-pos,pos-l)
n=x(r-pos,pos-l)
if m==0 and n==0:
print(1)
else:
print(n*2+m+2)
| n=x(r-pos,pos-l) | 10 | statement |
n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x@curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | while next_x@curr_x <= strong and Line != []: | 15 | operation |
n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | strong -= (x - curr_x) | 16 | statement |
n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x+curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | while next_x+curr_x <= strong and Line != []: | 15 | operation |
n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 0:
print(-1)
else:
print(vel) | n, k = list(map(int, input().split()))
Line = list(map(int, input().split()))
curr_x = Line.pop(0)
next_x = Line.pop(0)
vel = 0
while Line != []:
vel += 1
strong = int(k)
while next_x - curr_x <= strong and Line != []:
strong -= (next_x - curr_x)
curr_x = next_x
next_x = Line.pop(0)
if vel == 26:
print(-1)
else:
print(vel) | if vel == 26: | 20 | value |
import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny/1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| print(maxy-miny/1,maxx-minx+1) | 36 | operation |
import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx>>minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| print(maxy-miny+1,maxx>>minx+1) | 36 | operation |
import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x<0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| if x<0: | 25 | decision |
import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx+d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| import math
def ABS(a):
return int(math.fabs(a))
n = int(input())
a = input().split()
ans = 1
x = 0
y = 0
maxx = 1
maxy = 1
minx = 1
miny = 1
currentx = 1
currenty = 1
for i in range(n):
a[i] = int(a[i])
for i in range(n-1):
d = (a[i+1]-a[i])
if ABS(d)==1:
currentx = currentx|d
maxx = max(currentx,maxx)
minx = min(currentx,minx)
else:
if x==0:
x = ABS(d)
elif (x != ABS(d)):
ans = 0
break
currenty = currenty+d//x
maxy = max(currenty,maxy)
miny = min(currenty,miny)
if ans==1:
print('YES')
if x==0:
print(maxy-miny+1,maxx-minx+1)
else:
print(maxy-miny+1,x)
else:
print('NO')
| currentx = currentx|d | 21 | operation |
x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x>20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | if x>20: | 9 | decision |
x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x>20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | if x>20: | 9 | decision |
x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x>20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | if x>20: | 9 | decision |
x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x>20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | if x>20: | 9 | decision |
x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)*0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | x,y = map(int,input().split())
h,d,c,n = map(int,input().split())
t= 60*(19-x)+60-y
import math
a = ((h+(t*d))/n)
w= h/n
l = math.ceil(a)
u = math.ceil(w)
if x<20:
c1 = (l*c)<<0.8
c2 = (u)*c
else:
c1 = (u * c) * 0.8
c2 = u * c
z =(min(c1,c2))
p = format(z,".4f")
print(p) | c1 = (l*c)<<0.8 | 10 | operation |
mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (y == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | elif (y == 1): | 11 | statement |
mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18 * 2
k = int(input())
ans = ""
if (x > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | if (x > mx): | 4 | statement |
mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-38)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | print(-38) | 5 | value |
mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18/2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18/2 | 1 | operation |
mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k == 1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | mx = 18 * 2
k = int(input())
ans = ""
if (k > mx):
print(-1)
else:
while (k):
if (k > 1):
k -= 2
ans += '8'
elif (k<1):
ans += '6'
if (ans == ""):
ans += "1"
print(ans) | elif (k<1): | 11 | decision |
m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,148) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | if i>pow(10,148) or i<pow(10,-9): | 5 | value |
m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)-int(y)) | print (int(x)-int(y)) | 14 | operation |
m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(27,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | if i>pow(27,9) or i<pow(10,-9): | 8 | value |
m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i<pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | m=[int(i) for i in input().split()]
a= [int(i) for i in input().split() ]
b= [int(i) for i in input().split()]
for i in a :
if i>pow(10,9) or i>pow(10,-9):
a.remove(i)
for i in b :
if i>pow(10,9) or i<pow(10,-9):
b.remove(i)
x = max(a)
a.remove(x)
x = max(a)
y = max(b)
print (int(x)*int(y)) | if i>pow(10,9) or i>pow(10,-9): | 5 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:z=n-a[k-1]+1
print(m)
| if m<n-a[k-1]+1:z=n-a[k-1]+1 | 10 | statement |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m>z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| if m>z: m=z | 9 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m>z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| if m>z: m=z | 9 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m>z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| if m>z: m=z | 9 | decision |
t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k-1]+1:m=n-a[k-1]+1
print(m)
| t=int(input())
for i in range(t):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a[0]
for j in range(k-1):
z=round((a[j]-a[j+1])/2)
if m<z: m=z
if m<n-a[k<<1]+1:m=n-a[k-1]+1
print(m)
| if m<n-a[k<<1]+1:m=n-a[k-1]+1 | 10 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n==1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | while(n==1): | 6 | decision |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b>(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | if(b>(n-n//k)*a): | 16 | decision |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a>>(n - 1)
n = 1
print(c) | c += a>>(n - 1) | 20 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n>k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | if(n>k): | 7 | decision |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a*(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | n = int(input())
k = int(input())
a = int(input())
b = int(input())
c = 0
while(n>1):
if(n<k):
c += a%(n - 1)
n = 1
else:
if(n%k!=0):
t = n%k
n -= t
c += t*a
else:
if(b<(n-n//k)*a):
n = n//k
c += b
else:
c += a*(n - 1)
n = 1
print(c) | c += a%(n - 1) | 8 | operation |
from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a|1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | elif a|1 < ln: | 26 | operation |
from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1>ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | elif a + 1>ln: | 26 | decision |
from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 186] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | s_d -= l[a + 186] - l[a] | 27 | value |
from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
y = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | y = c[l[0]] | 11 | statement |
from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b - 1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | from collections import Counter
n, d = map(int, input().split())
x = list(map(int, input().split()))
c = Counter(x)
l = sorted(c.keys())
a, b = 0, 1
s_d = 0
s_p = c[l[0]]
m = c[l[0]]
ln = len(l)
for i in range(2 * ln):
if s_d < d:
if b < ln:
s_d += l[b] - l[b/1]
s_p += c[l[b]]
b += 1
if s_d <= d:
m = max(m, s_p)
elif a + 1 < ln:
s_d -= l[a + 1] - l[a]
s_p -= c[l[a]]
a += 1
print(n - m) | s_d += l[b] - l[b/1] | 19 | operation |
import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA%onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| while(plates > math.floor(cakeA%onplate) + math.floor(cakeB / onplate)): | 7 | operation |
import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + z.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| while(plates > math.floor(cakeA / onplate) + z.floor(cakeB / onplate)): | 7 | statement |
import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + math.floor(cakeB / onplate)):
onplate = onplate*1
print(onplate)
| onplate = onplate*1 | 8 | operation |
import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA / onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| import math
inp = input().split(" ")
plates = int(inp[0])
cakeA = int(inp[1])
cakeB = int(inp[2])
onplate = math.floor((cakeA + cakeB) / plates)
while(plates > math.floor(cakeA<<onplate) + math.floor(cakeB / onplate)):
onplate = onplate - 1
print(onplate)
| while(plates > math.floor(cakeA<<onplate) + math.floor(cakeB / onplate)): | 7 | operation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.