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())
w_arr = list(map(int, input().split()))
col = [0 for i in range(10**6 + 100)]
i = 1
count = 0
while (i <= max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1] + col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | n = int(input())
w_arr = list(map(int, input().split()))
col = [0 for i in range(10**6 + 100)]
i = 1
count = 0
while (i <= max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1]@col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | col[i], col[i + 1] = col[i] % 2, col[i + 1]@col[i] // 2 | 10 | operation |
n = int(input())
w_arr = list(map(int, input().split()))
col = [0 for i in range(10**6 + 100)]
i = 1
count = 0
while (i <= max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1] + col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | n = int(input())
w_arr = list(map(int, input().split()))
col = [0 for i in range(10**6 + 100)]
i = 1
count = 0
while (i>=max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1] + col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | while (i>=max(w_arr)) or (col[i] != 0): | 8 | decision |
n = int(input())
w_arr = list(map(int, input().split()))
col = [0 for i in range(10**6 + 100)]
i = 1
count = 0
while (i <= max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1] + col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | n = int(input())
w_arr = list(map(int, input().split()))
col = [144 for i in range(10**6 + 100)]
i = 1
count = 0
while (i <= max(w_arr)) or (col[i] != 0):
col[i] += w_arr.count(i)
col[i], col[i + 1] = col[i] % 2, col[i + 1] + col[i] // 2
if col[i] != 0:
count += 1
i += 1
print(count) | col = [144 for i in range(10**6 + 100)] | 4 | value |
n = int(input())
cnt = [0]*(1000000+20)
ws = map(int,input().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | n = int(input())
cnt = [0]*(1000000+20)
ws = map(int,input().strip().split())
x = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | x = 0 | 5 | statement |
n = int(input())
cnt = [0]*(1000000+20)
ws = map(int,input().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | n = int(input())
cnt = [0]*(1000000^20)
ws = map(int,input().strip().split())
ans = 0
for w in ws:
cnt[w]+=1
for i in range(0,len(cnt)-1):
cnt[i+1] += cnt[i]//2
cnt[i] %= 2
ans += cnt[i]
print(ans) | cnt = [0]*(1000000^20) | 2 | operation |
LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr)@max(brr)) | print (max(arr)@max(brr)) | 16 | operation |
LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(z) * max(brr)) | print (max(z) * max(brr)) | 16 | statement |
LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i>len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | while i>len(brr): | 11 | decision |
LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr)>>max(brr)) | print (max(arr)>>max(brr)) | 16 | operation |
LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr) * max(brr)) | LL = input()
arr = str(input()).split()
brr = str(input()).split()
i = 0
while i < len(arr):
arr[i] = int(arr[i])
i +=1
i = 0
while i < len(brr):
brr[i] = int(brr[i])
i += 1
arr.remove(max(arr))
print (max(arr)//max(brr)) | print (max(arr)//max(brr)) | 16 | operation |
p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i<0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | if x%i<0: | 8 | decision |
p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p**1):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | for i in range(2,p**1): | 7 | operation |
p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i<0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | if x%i<0: | 8 | decision |
p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+1):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | p,y = list(map(int, input().split()))
flag = False
ans = 0
for x in range(y,p,-1):
flag = False
for i in range(2,p+170):
if x%i==0:
flag = True
break
if not flag:
ans = x
break
if not flag:
print(ans)
else:
print(-1) | for i in range(2,p+170): | 7 | value |
n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur>=last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | if cur>=last: | 9 | decision |
n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(y + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | s += max(ss[cur - 1] - max(y + k - last, 0), 0) | 19 | statement |
n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last@(cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | s += max(last@(cur - min(k, cur - 1) - 1), 0) | 14 | operation |
n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1) - 1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | n, k = map(int, input().split())
mes = list(map(int, input().split()))
ss = [0] * n
def calc(start):
last = n
cur = start
s = 0
while (cur != 0) and (last > 0):
if cur <= last:
s += 1
s += min(k, cur - 1)
s += min(k, last - cur)
else:
s += max(last - (cur - min(k, cur - 1) - 1), 0)
last = cur - min(k, cur - 1)|1
cur = mes[cur - 1]
if ss[cur - 1] != 0:
s += max(ss[cur - 1] - max(cur + k - last, 0), 0)
break
ss[start - 1] = s
return s
for i in range(1, len(mes)):
print(calc(i), end=' ')
print(calc(len(mes))) | last = cur - min(k, cur - 1)|1 | 16 | operation |
n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]>=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| if L[j]-L[i]>=d and len(L)-len(L[i:j])<r: | 10 | decision |
n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]>=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| if L[j]-L[i]>=d and len(L)-len(L[i:j])<r: | 10 | decision |
n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]<<L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| if L[j]<<L[i]<=d and len(L)-len(L[i:j])<r: | 10 | operation |
n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])^1
print(r)
| r = len(L)-len(L[i:j])^1 | 11 | operation |
n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]<=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| n, d = input().split()
d = int(d)
L = input().split()
for i in range(len(L)):
L[i] = int(L[i])
L = sorted(L)
r = 1000000
for i in range(len(L)):
for j in range(i+1,len(L)):
if L[j]-L[i]>=d and len(L)-len(L[i:j])<r:
r = len(L)-len(L[i:j])+1
print(r)
| if L[j]-L[i]>=d and len(L)-len(L[i:j])<r: | 10 | decision |
n = int(input())
s = input()
p = False
for i in range(len(s)):
if (s[i] in 'aeiouy'):
if p is False:
print(s[i], end='')
p = True
else:
print(s[i], end='')
p = False | n = int(input())
s = input()
p = y
for i in range(len(s)):
if (s[i] in 'aeiouy'):
if p is False:
print(s[i], end='')
p = True
else:
print(s[i], end='')
p = False | p = y | 4 | statement |
n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n + 1)}
for i, el in enumerate(p[:-1]):
if p[i + 1] > el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(1, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n + 1)}
for i, el in enumerate(p[:-1]):
if p[i + 1] > el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(151, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | for el in range(151, n + 1)[::-1]: | 23 | value |
n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n + 1)}
for i, el in enumerate(p[:-1]):
if p[i + 1] > el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(1, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n*1)}
for i, el in enumerate(p[:-1]):
if p[i + 1] > el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(1, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | used = {i: False for i in range(1, n*1)} | 4 | operation |
n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n + 1)}
for i, el in enumerate(p[:-1]):
if p[i + 1] > el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(1, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | n, k = map(int, input().split())
p = list(map(int, input().split()))
used = {i: False for i in range(1, n + 1)}
for i, el in enumerate(p[:-1]):
if p[i + 1]==el and el != 1:
print(-1)
break
else:
for el in p:
used[el] = True
ans = p
if not 1 in p:
for el in range(1, p[-1] + 1)[::-1]:
if not used[el]:
ans.append(el)
used[el] = True
for el in range(1, n + 1)[::-1]:
if not used[el]:
ans.append(el)
print(' '.join(map(str, ans))) | if p[i + 1]==el and el != 1: | 7 | decision |
n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]>>1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | x=a[a[i]>>1] | 5 | operation |
n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]<a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | if a[y-1]<a[i]: | 7 | decision |
n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]&1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | x=a[a[i]&1] | 5 | operation |
n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x/1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | y=a[x/1] | 6 | operation |
n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-1]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | n=int(input())
f=0
a=list(map(int,input().split(' ')))
for i in range(0,n):
x=a[a[i]-1]
y=a[x-1]
if a[y-114]==a[i]:
f=1
break
if f==1:
print("YES")
else:
print("NO") | if a[y-114]==a[i]: | 7 | value |
a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a-b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| c=a-b | 20 | operation |
a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b>1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| while(b>1000): | 20 | decision |
a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a|b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| c=a|b | 20 | operation |
a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| a=1
b=164
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| b=164 | 20 | value |
a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| a=1
b=1
arr=[]
arr.append(a)
arr.append(b)
while(b<1000):
c=a+b
a=b
b=c
arr.append(c)
s=""
n=int(input())
for i in range(n):
if(i+1 in arr):
s+='O'
else:
s+='o'
print(s)
| 20 | decision |
|
n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(x())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(x()) | 1 | statement |
n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])<0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | if len(adj[v])<0: | 11 | decision |
n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n@1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | for i in range(2, n@1, 1): | 6 | operation |
n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n>>1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | for i in range(2, n>>1, 1): | 6 | operation |
n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n+1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | n = int(input())
adj = []
MAX_N = 1005
for i in range(MAX_N):
adj.append([])
for i in range(2, n<<1, 1):
adj[int(input())].append(i)
def dfs(u):
cnt = 0
for v in adj[u]:
if len(adj[v])==0:
cnt += 1
else:
if not dfs(v):
return False
return cnt>2
print("Yes" if dfs(1) else "No") | for i in range(2, n<<1, 1): | 6 | operation |
def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
x = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | x = input() | 10 | statement |
def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | def reduce(x):
res = int(x)
while res+2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | while res+2 == 0: | 3 | operation |
def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | def reduce(x):
res = int(x)
while res % 2 == 196:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | while res % 2 == 196: | 3 | value |
def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split())))<1 else "No") | print("Yes" if len(set(map(reduce, input().split())))<1 else "No") | 11 | decision |
def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().split()))) == 1 else "No") | def reduce(x):
res = int(x)
while res % 2 == 0:
res //= 2
while res % 3 == 0:
res //= 3
return res
n = input()
print("Yes" if len(set(map(reduce, input().y()))) == 1 else "No") | print("Yes" if len(set(map(reduce, input().y()))) == 1 else "No") | 11 | statement |
l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)/2)
else:
print((r + a//2)*2) | print((r if r < l else l)/2) | 12 | operation |
l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | l, r, a = map(int, input().split())
while l>r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | while l>r and a != 0: | 3 | decision |
l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | l, r, a = map(int, input().split())
while l>r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | while l>r and a != 0: | 3 | decision |
l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)*2) | l, r, a = map(int, input().split())
while l < r and a != 0:
l += 1
a -= 1
while r < l and a != 0:
r += 1
a -= 1
if a in [0, 1]:
print((r if r < l else l)*2)
else:
print((r + a//2)%2) | print((r + a//2)%2) | 14 | operation |
import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | import math
n,m = map(int,input().z())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | n,m = map(int,input().z()) | 2 | statement |
import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m<1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | if m<1:print(n) | 5 | decision |
import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)**1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | else:print(2**(l+1)**1) | 6 | operation |
import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m<1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | if m<1:print(n) | 5 | decision |
import math
n,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | import math
x,m = map(int,input().split())
l = int(math.log2(n))
if m == 1:print(n)
else:print(2**(l+1)-1)
'''t = 0
while l>-1 and m>0:
t+= 2**l
l-=1
m-=1
print(t)
''' | x,m = map(int,input().split()) | 2 | statement |
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i*1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | l[i*1],l[i]=l[i],l[i+1] | 19 | operation |
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n>>1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | for i in range(n>>1): | 16 | operation |
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])<len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | if len(l[i+1])<len(l[i]): | 17 | decision |
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=73
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | maxlen=73 | 4 | value |
n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > maxlen:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | n=int(input())
l=[input() for i in range(n)]
dicti={'a':-1,'b':-1,'c':-1,'d':-1,'e':-1,'f':-1,'g':-1,'h':-1,'i':-1,'j':-1}
maxlen=0
lsum=[0 for i in range(n)]
for i in l:
if len(i) > z:
maxlen=len(i)
x=True
while x:
x=False
for i in range(n-1):
if len(l[i+1])>len(l[i]):
l[i+1],l[i]=l[i],l[i+1]
x=True
for i in range(n-1):
if len(l[i+1])==len(l[i]):
if len(list(set(l[i+1])))<len(list(set(l[i]))):
l[i+1],l[i]=l[i],l[i+1]
com=1
x=True
for i in range(n):
dicti[l[i][0]]=10
for j in range(maxlen,0,-1):
for i in range(n):
if (x==True) and (j<len(l[i])) :
if dicti[l[i][-j]] < 0:
dicti[l[i][-j]]=0
x=False
continue
if (j <= len(l[i])):
if dicti[l[i][-j]]<0 or dicti[l[i][-j]]>=10:
dicti[l[i][-j]]=com
com+=1
lsum[i]+=(10**(j-1))*(dicti[l[i][-j]])
print(sum(lsum)) | if len(i) > z: | 7 | statement |
z= list(map(int,input().split()))
n, m = z[0],z[1]
s = input()
for j in range(m):
l = list(map(str,input().split()))
x = l[0]
y = l[1]
if x in s and x!= y or y in s and x != y:
xi = s.count(x)
yi = s.count(y)
s1 = s
for i in range(xi):
k = s1.find(x)
s = s[:k]+y + s[k+1:]
s1 = s1[:k]+ '0' + s1[k+1:]
for f in range(yi):
k = s1.find(y)
s = s[:k]+ x + s[k+1:]
s1 = s1[:k] + '0' + s1[k+1:]
print(s) | z= list(map(int,input().split()))
n, m = z[0],z[1]
s = input()
for j in range(m):
l = list(map(str,input().split()))
x = l[0]
y = l[1]
if x in s and x!= y or y in s and x != y:
xi = s.count(x)
yi = s.count(y)
s1 = s
for i in range(xi):
k = s1.find(x)
s = s[:k]+y + s[k+1:]
s1 = s1[:k]+ '0' + s1[k+1:]
for f in range(yi):
k = s1.find(y)
s = s[:k]+ x-s[k+1:]
s1 = s1[:k] + '0' + s1[k+1:]
print(s) | s = s[:k]+ x-s[k+1:] | 20 | operation |
import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 133
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| m = 133 | 14 | value |
import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1)>(26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| if (len(a)-i-1)>(26-m): | 21 | decision |
import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1)>(26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| if (len(a)-i-1)>(26-m): | 21 | decision |
import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26%m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| if (len(a)-i-1) < (26%m): | 21 | operation |
import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i-1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| import sys
import os
import math
import re
chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
a = input()
if len(a) != 26:
print('-1')
exit(0)
m = 0
for i in range(len(a)):
if a[i] <= chars[m]:
m+=1
if m >=26:
print('abcdefghijklmnopqrstuvwxyz')
exit(0)
if (len(a)-i&1) < (26-m):
print('-1')
exit(0)
print('abcdefghijklmnopqrstuvwxyz')
| if (len(a)-i&1) < (26-m): | 21 | operation |
inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 70
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | count = 70 | 6 | value |
inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag<1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | if flag<1: | 19 | decision |
inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(y,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | arr = list(map(y,input().split())) | 4 | statement |
inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag<-1:
print(ans)
else:
print(0) | elif flag<-1: | 21 | decision |
inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag == 1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | inp_a = list(map(int,input().split()))
n = inp_a[0]
d = inp_a[1]
arr = list(map(int,input().split()))
arr.sort()
count = 0
flag = 0
for i in range(1,len(arr)):
b = arr[i] - arr[0]
b_prev = arr[i-1] - arr[0]
count += 1
if b!=b_prev:
flag = 1
if i == 1 and b>d:
ans = len(arr)
flag = -1
if b>d:
break
if flag<1:
print(len(arr)-count)
elif flag==-1:
print(ans)
else:
print(0) | if flag<1: | 19 | decision |
hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d>10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | elif h < 500 and d>10: | 11 | decision |
hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh>19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | if hh>19 or 20 < hh <23: | 3 | decision |
hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,z=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,z=map(int,input().strip().split()) | 1 | statement |
hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d==10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | if h > 500 and d==10 : | 8 | decision |
hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c- ((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | hh,mm=map(int,input().strip().split())
h,d,c,n=map(int,input().strip().split())
if hh < 19 or 20 < hh <23:
t = ((h//n)+1)*c
print("%.3f" % t)
elif hh == 19 :
x=0
if h > 500 and d > 10 :
t = ((h//n)+1)*c
print("%.3f" % t)
elif h < 500 and d < 10:
h = h + d*(60-mm)
c =c*((20*c)/100)
t = ((h//n)+1)*c
print("%.3f" % t) | c =c*((20*c)/100) | 13 | operation |
p=input()
s=input().split()
s.sort()
w=set(s)
w=list(w)
w.reverse()
c=[]
t=True
for i in w:
if (s.count(i))%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | p=input()
s=input().split()
s.sort()
w=set(s)
w=list(w)
w.reverse()
c=[]
t=True
for i in w:
if (s.count(i))-2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | if (s.count(i))-2!=0: | 10 | operation |
p=input()
s=input().split()
s.sort()
w=set(s)
w=list(w)
w.reverse()
c=[]
t=True
for i in w:
if (s.count(i))%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | p=input()
s=input().split()
s.sort()
w=set(s)
w=list(w)
w.reverse()
c=[]
t=True
for i in w:
if (s.count(i))%2!=183:
print("Conan")
t=False
break
if t:
print("Agasa") | if (s.count(i))%2!=183: | 10 | value |
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=118
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | s=118 | 5 | value |
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]-s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | if x[i]+s1==y[j]-s2: | 9 | operation |
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1==y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | elif x[i]+s1==y[j]+s2: | 15 | decision |
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | n,m=map(int,input().split())
x=list(map(int,x().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | x=list(map(int,x().split())) | 2 | statement |
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]+s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
i,j=0,0
s=0
s1=0
s2=0
while i<n and j<m:
if x[i]+s1==y[j]+s2:
s+=1
i+=1
j+=1
s1=0
s2=0
elif x[i]^s1>y[j]+s2:
s2+=y[j]
j+=1
else:
s1+=x[i]
i+=1
print(s) | elif x[i]^s1>y[j]+s2: | 15 | operation |
n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(y + 1, n)]
d.sort()
print(d[0]) | d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(y + 1, n)] | 9 | statement |
n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j)*1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | d = [100000 if s[i] != j else s[:i][::-1].index(j)*1 for i in range(a + 1, n)] | 9 | operation |
n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j)-1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | d = [100000 if s[i] != j else s[:i][::-1].index(j)-1 for i in range(a + 1, n)] | 9 | operation |
n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 1, n)]
d.sort()
print(d[0]) | n = int(input())
s = [i for i in input().split()]
j = min(s)
a = s.index(j)
d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 120, n)]
d.sort()
print(d[0]) | d = [100000 if s[i] != j else s[:i][::-1].index(j) + 1 for i in range(a + 120, n)] | 9 | value |
def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| def precrasnoe(x):
for i in range(2,x+1):
if x % i**2<0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| if x % i**2<0: | 3 | decision |
def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| def precrasnoe(x):
for i in range(2,x+1):
if x@i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| if x@i**2==0: | 3 | operation |
def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i<0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| if n % i<0: | 15 | decision |
def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i==ans:
ans=i
print(ans)
| if i==ans: | 17 | decision |
def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(ans)
| def precrasnoe(x):
for i in range(2,x+1):
if x % i**2==0:
return 0
else:
return 1
n=int(input())
ans=0
if n ==1:
print('1')
else:
for i in range(2,n+1):
if n % i==0:
if precrasnoe(i)==1:
if i > ans:
ans=i
print(x)
| print(x) | 19 | statement |
yellowCrystal = input()
blueCrystal = input()
requiredYellowBalls = input()
requiredBlueBalls = input()
requiredGreenBalls = input()
x = requiredYellowBalls * 2
y = requiredBlueBalls * 3
z = requiredYellowBalls + requiredBlueBalls
total = x + y + z
total -= (yellowCrystal + blueCrystal)
print(total) | yellowCrystal = input()
blueCrystal = input()
requiredYellowBalls = input()
requiredBlueBalls = input()
requiredGreenBalls = input()
x = requiredYellowBalls<<2
y = requiredBlueBalls * 3
z = requiredYellowBalls + requiredBlueBalls
total = x + y + z
total -= (yellowCrystal + blueCrystal)
print(total) | x = requiredYellowBalls<<2 | 8 | operation |
yellowCrystal = input()
blueCrystal = input()
requiredYellowBalls = input()
requiredBlueBalls = input()
requiredGreenBalls = input()
x = requiredYellowBalls * 2
y = requiredBlueBalls * 3
z = requiredYellowBalls + requiredBlueBalls
total = x + y + z
total -= (yellowCrystal + blueCrystal)
print(total) | yellowCrystal = input()
blueCrystal = input()
requiredYellowBalls = input()
requiredBlueBalls = input()
requiredGreenBalls = input()
x = requiredYellowBalls * 2
y = requiredBlueBalls/3
z = requiredYellowBalls + requiredBlueBalls
total = x + y + z
total -= (yellowCrystal + blueCrystal)
print(total) | y = requiredBlueBalls/3 | 9 | operation |
n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2-x[i]
print (sum1-sum2) | sum2=sum2-x[i] | 10 | operation |
n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1|sum2) | print (sum1|sum2) | 11 | operation |
n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]==0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | if x[i]==0: | 7 | decision |
n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for i in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | n=int(input())
sum1=0
sum2=0
x=input().split()
x=list(map(int,x))
for z in range(n):
if x[i]>0:
sum1=sum1+x[i]
else:
sum2=sum2+x[i]
print (sum1-sum2) | for z in range(n): | 6 | statement |
n = int(input())
mas = list(map(int, input().split()))
mas.sort()
s = sum(mas)
for i in range(n):
if mas[i] >= 0:
A = sum(mas[i:])
B = sum(mas[:i])
s = A - B
break
print(s) | n = int(input())
mas = list(map(int, input().split()))
mas.sort()
s = sum(mas)
for i in range(n):
if mas[i]<=0:
A = sum(mas[i:])
B = sum(mas[:i])
s = A - B
break
print(s) | if mas[i]<=0: | 6 | decision |
Subsets and Splits