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, m = map(int, input().split())
s = []
ok = 1
for i in range(n):
a = input()
s.append(a)
for i in range(n):
for j in range(m):
if s[i][j] == 'S':
if i-1 >= 0 and s[i-1][j] == 'W':
ok = 0
if j-1 >= 0 and s[i][j-1] == 'W':
ok = 0
if i+1 < n and s[i+1][j] == 'W':
ok = 0
if j+1 < m and s[i][j+... | n, m = map(int, input().split())
s = []
ok = 1
for i in range(n):
a = input()
s.append(a)
for i in range(n):
for j in range(m):
if s[i][j] == 'S':
if i-1 >= 0 and s[i-1][j] == 'W':
ok = 0
if j-1 >= 0 and s[i][j//1] == 'W':
ok = 0
if i+1 < n and s[i+1][j] == 'W':
ok = 0
if j+1 < m and s[i][j... | if j-1 >= 0 and s[i][j//1] == 'W': | 12 | operation |
import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | inv = (n^(n - 1)) // 2 - good | 22 | operation |
import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n<<1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +... | t = [0] * (n<<1) | 7 | operation |
import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | p = (r - l + 1) * (r*l) // 2 | 28 | operation |
import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [26] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +... | p = [26] * (n+1) | 8 | value |
import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i <= n:
t[i] += 1
i +=... | import sys
f = sys.stdin
n = int(f.readline())
a = [int(x) for x in f.readline().split()]
t = [0] * (n+1)
p = [1] * (n+1)
for i in range(2, n+1, 2):
p[i] = 2 * p[i//2]
good = 0
for x in a:
i = x
while i > 0:
good += t[i]
i -= p[i]
i = x
while i>=n:
t[i] += 1
i += p... | while i>=n: | 19 | decision |
n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | if incr == n + 1: print(-140) | 21 | value |
n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | b[i] = d[56] | 16 | value |
n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i>>1]])
b[i] ... | d = sorted([a[i-1], a[i], a[i>>1]]) | 15 | operation |
n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n-1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | n = int(input())
a = list(map(int, input().split()))
b = a.copy()
incr = 0
f = True
while f and incr <= n:
a, b = b, a
for i in range(n):
if i == 0:
b[0] = a[0]
elif i == (n-1):
b[n+1] = a[i]
else:
d = sorted([a[i-1], a[i], a[i+1]])
b[i] =... | b[n+1] = a[i] | 13 | operation |
import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | def z(combination): | 29 | statement |
import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0]<"1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answer)
... | if splitter[0]<"1": | 11 | decision |
import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | y(last_answer) | 25 | statement |
import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0]<"1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answer)
... | if splitter[0]<"1": | 11 | decision |
import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | import itertools
def main(kol):
c = set()
h = []
last_two = False
last_answer = 0
for i in range(kol):
b = input()
splitter = b.split()
if splitter[0] == "1":
c.add(int(splitter[1]))
last_two = False
elif last_two:
print(last_answe... | chaines = itertools.chain(list(itertools.combinations(c, i)) for i in range(1, len(c)//1)) | 18 | operation |
n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | if(minsum<1000000): | 24 | decision |
n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | if(d2[z][x]<1): | 20 | decision |
n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | n,m = map(int,input().split())
mat = []
d2 = []
od = []
for i in range(n):
mat.append([])
d2.append([0 for i in range(n)])
od.append(0)
for i in range(m):
a,b = map(int,input().split())
mat[a-1].append(b-1)
mat[b-1].append(a-1)
d2[a-1][b-1]=d2[b-1][a-1]=1
od[a-1]+=1
od[b-1]+=1
minsum = ... | if(d2[z][x]<1): | 20 | decision |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n % k)
n -= n % k
else:
if b < a * (n - (n // k)):
t += b
n /= k
else:
t +=... | n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n % k)
n -= n % k
else:
if b>a * (n - (n // k)):
t += b
n /= k
else:
t += a... | if b>a * (n - (n // k)): | 16 | decision |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n % k)
n -= n % k
else:
if b < a * (n - (n // k)):
t += b
n /= k
else:
t +=... | n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n**k)
n -= n % k
else:
if b < a * (n - (n // k)):
t += b
n /= k
else:
t += ... | t += a * (n**k) | 13 | operation |
n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n % k)
n -= n % k
else:
if b < a * (n - (n // k)):
t += b
n /= k
else:
t +=... | n = int(input())
k = int(input())
a = int(input())
b = int(input())
t = 0
while n > 1:
if n < k:
t += a * (n - 1)
n = 1
elif n % k != 0:
t += a * (n % k)
n -= n % k
else:
if b < a * (n - (n // k)):
t += b
n /= k
else:
t +=... | t += a*(n - (n // k)) | 20 | operation |
import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt<'1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | if qt<'1': | 6 | decision |
import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[116]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | nstr = istr[qi[0]:qi[116]+1] | 11 | value |
import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)^1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | qi = [int(x)^1 for x in qi] | 5 | operation |
import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = z(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | istr = z(istr) | 7 | statement |
import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt == '2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | import re
istr = input()
for i in range(int(input())):
qt, *qi, qs = input().split()
qi = [int(x)-1 for x in qi]
if qt == '1':
istr = list(istr)
istr[qi[0]] = qs
istr = ''.join(istr)
elif qt<'2':
nstr = istr[qi[0]:qi[1]+1]
nsub = re.finditer(rf'(?=({qs}))', nstr)
print(sum(1 for _ in nsub)) | elif qt<'2': | 10 | decision |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/2)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)==p... | n=int(z())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/2)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)==prize... | n=int(z()) | 1 | statement |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/2)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)==p... | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/115)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)=... | for secs in range(int(friend/115)+1): | 9 | value |
n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/2)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)==p... | n=int(input())
prize_pos=list(input().split(' '))
me=1
friend=10**6
secs=0
found=0
right=n-1
left=0
for secs in range(int(friend/2)+1):
if found==n and left>right:
break
elif str(me)==prize_pos[left] and str(friend)==prize_pos[right]:
left+=1
found+=2
right-=1
elif str(me)<pr... | elif str(me)<prize_pos[left]: | 16 | decision |
l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c - a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c@a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | d = c@a | 5 | operation |
l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c - a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c>>a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | d = c>>a | 5 | operation |
l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c - a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c - y
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | d = c - y | 5 | statement |
l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c > a:
d = c - a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | l, r, a = map(int, input().split())
c = abs(r - l)
sum = 0
if c==a:
d = c - a
sum = l + r - d + a
else:
sum = l + r + c
a -= c
sum += a
if sum % 2 != 0:
sum -= 1
print(sum) | if c==a: | 4 | decision |
import string
n, m = [int(x) for x in input().split(' ')]
s = input()
xy = {}
for c in string.ascii_lowercase:
xy[c] = c
for i in range(m):
x, y = input().split(' ')
x_ls = []
y_ls = []
for k, v in xy.items():
if v == x:
x_ls.append(k)
if v == y:
y_ls.ap... | import string
n, m = [int(x) for x in input().split(' ')]
s = input()
xy = {}
for c in string.ascii_lowercase:
xy[c] = c
for i in range(m):
x, y = input().split(' ')
x_ls = []
y_ls = []
for k, v in xy.items():
if v == x:
x_ls.append(k)
if v<y:
y_ls.appen... | if v<y: | 20 | decision |
import string
n, m = [int(x) for x in input().split(' ')]
s = input()
xy = {}
for c in string.ascii_lowercase:
xy[c] = c
for i in range(m):
x, y = input().split(' ')
x_ls = []
y_ls = []
for k, v in xy.items():
if v == x:
x_ls.append(k)
if v == y:
y_ls.ap... | import string
n, m = [int(x) for x in input().split(' ')]
s = input()
xy = {}
for c in string.ascii_lowercase:
xy[c] = c
for i in range(m):
x, y = input().split(' ')
x_ls = []
y_ls = []
for k, v in xy.items():
if v == x:
x_ls.append(k)
if v<y:
y_ls.appen... | if v<y: | 20 | decision |
n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
fo... | n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs<1:
fibs = [1]
name = ""
for i... | if fibs<1: | 20 | decision |
n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
fo... | n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1]-solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
for ... | solutions.append(solutions[i - 1]-solutions[i - 2]) | 13 | operation |
n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
fo... | n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i*2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
for ... | solutions.append(solutions[i - 1] + solutions[i*2]) | 13 | operation |
n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
fo... | n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i-2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
for ... | solutions.append(solutions[i - 1] + solutions[i-2]) | 13 | operation |
n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(1)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
fo... | n = int(input())
def fib2(n):
if n <= 1:
return 1
solutions = []
solutions.append(1)
solutions.append(89)
i = 2
while solutions[i - 1] + solutions[i - 2] <= n:
solutions.append(solutions[i - 1] + solutions[i - 2])
i = i + 1;
return solutions[1:]
fibs = fib2(n)
if fibs == 1:
fibs = [1]
name = ""
f... | solutions.append(89) | 9 | value |
from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | if v<1: | 19 | decision |
from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | if v<1: | 19 | decision |
from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | from y import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
for k,v in d... | from y import defaultdict | 1 | statement |
from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | from collections import defaultdict
n = int(input())
ws = map(int,input().strip().split())
d = defaultdict(int)
ans = 0
for w in ws:
input = w
while True:
d[input] += 1
if d[input] == 2:
d[input] = 0
del d[input]
input += 1
else:
break
fo... | if v<1: | 19 | decision |
if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a>yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | if a>yellow : | 9 | decision |
if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x|1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | yellow = 2*x|1*y | 6 | operation |
if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(x) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | x,y,z = [int(x) for i in input().split()] | 3 | statement |
if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1*y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | if __name__ == "__main__" :
a,b = [int(x) for x in input().split()]
x,y,z = [int(i) for i in input().split()]
yellow = 0
blue = 0
yellow = 2*x + 1*y
blue = 1/y + 3*z
res = 0
if a<yellow :
res = res + abs(a-yellow)
if b<blue :
res = res + abs(b-blue)
print(res) | blue = 1/y + 3*z | 7 | operation |
from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]<1:
... | if d[v]<1: | 16 | decision |
from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | for i in range(1,n//1): | 28 | operation |
from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]<1:
... | if d[v]<1: | 16 | decision |
from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]<1:
... | if d[v]<1: | 16 | decision |
from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | from queue import Queue
N=120000
n,m=map(int,input().split())
s=[[]for i in range(N)]
f=[[]for i in range(N)]
t=[[0,0]for i in range(N)]
r=[[0,0]for i in range(N)]
d=[0 for i in range(N)]
c=0
def dfs(u):
global c
d[u]=1
if c:return
for v in s[u]:
if d[v]==2:continue
if d[v]==1:
... | for i in range(1,n//1): | 22 | operation |
import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i/1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| if len(set(n % (i/1) for i in range(th))) != th: | 14 | operation |
import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n/(i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| if len(set(n/(i + 1) for i in range(th))) != th: | 14 | operation |
import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k*1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| for th in range (1, k*1): | 14 | operation |
import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
y = "No"
break;
print(ans)
| y = "No" | 14 | statement |
import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| import sys
f = sys.stdin
n,k = map(int,f.readline().split())
ans = "Yes"
for th in range (1, k+1):
if len(set(n % (i + 1) for i in range(th))) != th:
ans = "No"
break;
print(ans)
| 14 | decision | |
s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | s = input()
ans = 0
ls = x(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmin ... | ls = x(s) | 3 | statement |
s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | if y <0 : | 17 | statement |
s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | if unclosedmin>0 : | 17 | decision |
s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | s = input()
ans = 0
ls = len(s)
for l in range(ls):
unclosedmin = 0
unclosedmax = 0
for r in range(l,ls):
if s[r] == '(':
unclosedmin += 1
unclosedmax += 1
elif s[r] == ')':
unclosedmin -= 1
unclosedmax -= 1
else:
unclosedmi... | if unclosedmax>0: | 19 | decision |
n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
p... | n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n^1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
p... | for i in range(2,n^1): | 4 | operation |
n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
p... | n=int(input())
tree={1:0}
non_leaf={x:183 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
... | non_leaf={x:183 for x in range(1,n)} | 3 | value |
n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
p... | n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in z(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
print... | for i in z(2,n+1): | 4 | statement |
n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]%3==0 for x in non_leaf):
p... | n=int(input())
tree={1:0}
non_leaf={x:0 for x in range(1,n)}
for i in range(2,n+1):
tree[i]=int(input())
non_leaf[tree[i]]+=1
print(tree)
print(non_leaf)
for i in non_leaf:
if non_leaf[i] != 0 and i!=1:
tmp=tree[i]
non_leaf[tmp]-=1
if all(non_leaf[x]|3==0 for x in non_leaf):
p... | if all(non_leaf[x]|3==0 for x in non_leaf): | 16 | operation |
n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | I = I-1 | 30 | operation |
n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i%1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | if abs(a[i] - a[i%1]) !=1: | 6 | operation |
n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i//1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = T... | if abs(a[i] - a[i//1]) !=1: | 6 | operation |
n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i] -a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tr... | n = int(input())
a = [ int(x) for x in input().split()]
last = 1
y = -1
for i in range(1,n):
if abs(a[i] - a[i-1]) !=1:
y =abs(a[i]-a[i-1])
break
if y== -1 or y ==0:
if y == -1:
print("YES")
print(int(1e9),int(1e9))
else:
print("NO")
else :
f = Tru... | y =abs(a[i]-a[i-1]) | 7 | operation |
n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
y=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | y=s[:i+1]+s[i+2:] | 7 | statement |
n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i//2:]
else:
i+=1
print(s) | s=s[:i+1]+s[i//2:] | 7 | operation |
n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i>n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | while i>n-1 and len(s) > 1: | 5 | decision |
n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i < n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | n=int(input())
l = ['a','e','i','o','u','y']
s=input()
i=0
while i>n-1 and len(s) > 1:
if s[i] in l and s[i+1] in l:
s=s[:i+1]+s[i+2:]
else:
i+=1
print(s) | while i>n-1 and len(s) > 1: | 5 | decision |
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2<0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | if c%2<0: | 6 | decision |
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==117:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | if c%2==117: | 6 | value |
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c-2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | if c-2==0: | 6 | operation |
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c<n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | if c<n: | 5 | decision |
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%2==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | n=int(input())
a=list(map(int,input().split()))
ma=max(a)
c=a.count(ma)
if c==n:
if c%191==0:
print("Agasa")
else:
print("Conan")
else:
print("Conan") | if c%191==0: | 6 | value |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k//max(good))) | stdout.write(str(k//max(good))) | 14 | operation |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i]<0:
good.append(a[i])
stdout.write(str(k/max(good))) | if moda[i]<0: | 12 | decision |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | from sys import stdin, stdout
y = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | y = [] | 2 | statement |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k%max(good))) | stdout.write(str(k%max(good))) | 14 | operation |
from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n%x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | from sys import stdin, stdout
Input = []
Input = [stdin.readlines()]
Input = Input[0]
Input = [x.split(" ") for x in Input]
n = int(Input[0][0])
k = int(Input[0][1])
a = [int(x) for x in Input[1]]
moda = [n**x for x in a]
good = []
for i in range(n):
if moda[i] == 0:
good.append(a[i])
stdout.write(str(k/max(good))) | moda = [n**x for x in a] | 9 | operation |
n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)*max(b)
q = max(a)*min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)*max(b)
q = max(a)**min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | q = max(a)**min(b) | 8 | operation |
n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)*max(b)
q = max(a)*min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)*max(b)
q = max(a)-min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | q = max(a)-min(b) | 8 | operation |
n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)*max(b)
q = max(a)*min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | n,m = map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a.sort()
x = a.pop()
b.sort()
p = max(a)<<max(b)
q = max(a)*min(b)
r = min(a)*min(b)
s = min(a)*max(b)
ans = max(p,q,r,s)
print(ans) | p = max(a)<<max(b) | 7 | operation |
n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | s1=s1<<l[f][0]*l[f][1] | 43 | operation |
n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]-l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | s1=sum([l[i][0]-l[i][1] for i in range(n)]) | 43 | operation |
n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | s1=s1-l[f][74]*l[f][1] | 43 | value |
n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | 43 | decision | |
n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s<t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | n,t=map(int,input().split())
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l=[[l2[i],l1[i]] for i in range(n)]
l.sort()
s1=sum([l[i][0]*l[i][1] for i in range(n)])
s2=sum(l1)
s=s1/s2
f=n-1
d=0
if s>t:
while s<t and d<n:
s2=s2-l[d][1]
s1=s1-l[d][0]*l[d][1]
if s!=0:
... | if s>t: | 43 | decision |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | if res>=0: | 23 | decision |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 67
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[... | res_index = 67 | 9 | value |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | if y == '__main__': | 36 | statement |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | res = start_min - start_time_zone + 163 | 22 | value |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(n_hours, people, window_len):
people += people
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, n_hours-1):
cur_sum -= people[index]
cur_sum += people[i... | if res>=0: | 23 | decision |
import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i+1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]<"U" and seq[i+1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]<"U" and seq[i+1]=="R")): | 8 | decision |
import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i+1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i//1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i//1]=="R")): | 8 | operation |
import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]=="R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i+1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | import re
n = input()
seq = input()
def replace_char(seq):
slen = len(seq)
for i,c in enumerate(seq):
if(i<=len(seq)-2):
if((seq[i]<"R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i+1]=="R")):
seq = seq[:i] + "D" + (seq[i+2:] if (i<len(seq)-1) else "")
break
... | if((seq[i]<"R" and seq[i+1]=="U") or (seq[i]=="U" and seq[i+1]=="R")): | 8 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.