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 |
|---|---|---|---|---|
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
... | return (len(seq) if (slen<len(seq)) else replace_char(seq)) | 11 | decision |
n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | matrix[i] = ''.join(matrix[z]) | 24 | statement |
n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1==0 else 0
return result
for i in range(n):
matrix.append(in... | result += count - x + 1 if count - x + 1==0 else 0 | 12 | decision |
n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k<'.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(inpu... | if k<'.': | 9 | decision |
n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 65 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(... | result += count - x + 65 if count - x + 1 > 0 else 0 | 12 | value |
n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k == '.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(i... | n, m, k = [int(x) for x in input().split()]
matrix = []
result = 0
def inc(i, x):
count = 0
result = 0
for k in i:
if k<'.':
count += 1
else:
result += count - x + 1 if count - x + 1 > 0 else 0
return result
for i in range(n):
matrix.append(inpu... | if k<'.': | 9 | decision |
def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def x(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def x(a, n): | 1 | statement |
def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2)&f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | return f(a, n / 2)&f(a, n / 2) | 7 | operation |
def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 153 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | if(n % 153 == 0): | 6 | value |
def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2<0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | if(n % 2<0): | 6 | decision |
def f(a, n):
if n == 0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | def f(a, n):
if n<0:
return 1
if n == 1:
return a
if(n % 2 == 0):
return f(a, n / 2) * f(a, n / 2)
else:
return a * f(a, (n - 1) / 2)
n = int(input())
m = int(input())
print(m % f(2, n)) | if n<0: | 2 | decision |
def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| def find(x,b):
if x/2//b>0: return x-2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| if x/2//b>0: return x-2/(x/2//b) | 2 | operation |
def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| def find(x,b):
if x/2%b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| if x/2%b>0: return x/2/(x/2//b) | 2 | operation |
def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| def find(x,b):
if x/2//b>0: return y/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| if x/2//b>0: return y/2/(x/2//b) | 2 | statement |
def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b==a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| elif b==a: print(-1) | 7 | decision |
def find(x,b):
if x/2//b>0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| def find(x,b):
if x/2//b==0: return x/2/(x/2//b)
else: return 10000000000
a,b=map(int,input().split())
if a==b: print("%.9f"%a)
elif b>a: print(-1)
else: print("%.9f"%min(find(a-b,b),find(a+b,b)))
| if x/2//b==0: return x/2/(x/2//b) | 2 | decision |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
y.append... | y.append(j) | 20 | statement |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,y(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append(j... | for i in range(2,y(n**0.5)+1): | 3 | statement |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | __author__ = 'dwliv_000'
def isPrime(y):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | def isPrime(y): | 2 | statement |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k<0)and(isPrime(j)):
t.append(... | if(j%k<0)and(isPrime(j)): | 19 | decision |
__author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k==0)and(isPrime(j)):
t.append... | __author__ = 'dwliv_000'
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
n=int(input())
c={}
c[1]=[]
c[2]=[2]
c[3]=[2,3]
c[4]=[2,3,4]
c[5]=[2,4,3,5]
k=6
while k<=n:
t=[]
for j in range(2,k):
if(j%k<0)and(isPrime(j)):
t.append(... | if(j%k<0)and(isPrime(j)): | 19 | decision |
from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el]<<2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | if mas[el]<<2 != 0: | 7 | operation |
from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 77
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | ch = 77 | 5 | value |
from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el]+2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | if mas[el]+2 != 0: | 7 | operation |
from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = z(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | s = z(mas.keys()) | 4 | statement |
from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el] % 2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | from collections import Counter
n = int(input())
mas = dict(Counter((map(int, input().split()))))
s = sorted(mas.keys())
ch = 0
for el in s:
if mas[el]|2 != 0:
del mas[el]
ch += 1
if ch % 2 == 1:
print("Conan")
else:
print("Agasa") | if mas[el]|2 != 0: | 7 | operation |
A, B = int(input()),int(input())
res = 0
curA = 1
curB = 1
A, B = min(A, B), max(A, B)
while A != B:
A += 1
res += curA
curA += 1
if A == B:
break
B -= 1
res += curB
curB += 1
print(res) | A, B = int(input()),int(input())
res = 0
curA = 1
curB = 1
A, B = min(A, B), max(A, B)
while A != B:
A += 1
res += curA
curA += 1
if A == B:
break
B -= 81
res += curB
curB += 1
print(res) | B -= 81 | 15 | value |
n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | n=int(input())
m=4
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | m=4 | 2 | value |
n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n^1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | for x in range(n^1): | 6 | operation |
n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m<=x:
print('NO')
quit()
print('YES') | if s[x]=='0' and m<=x: | 8 | decision |
n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n<<1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | for x in range(n<<1): | 6 | operation |
n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]=='0' and m>=x:
print('NO')
quit()
print('YES') | n=int(input())
m=0
a=[int(x) for x in input().split()]
s=input()
m=0
for x in range(n-1):
m=max(a[x],m)
if s[x]<'0' and m>=x:
print('NO')
quit()
print('YES') | if s[x]<'0' and m>=x: | 8 | decision |
def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j^j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | while j^j <= i: | 7 | operation |
def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i>>j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | if not i>>j: | 8 | operation |
def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j>=i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | while j * j>=i: | 7 | decision |
def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j^j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | while j^j <= i: | 7 | operation |
def main():
P, Y = map(int, input().split())
y = Y if Y % 2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | def main():
P, Y = map(int, input().split())
y = Y if Y^2 else Y - 1
for i in range(y, P, -2):
j = 3
while j * j <= i:
if not i % j:
break
j += 2
else:
print(i)
break
else:
print(-1)
main() | y = Y if Y^2 else Y - 1 | 4 | operation |
__author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | __author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | if(n<0): | 29 | decision |
__author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | __author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | n=n-124 | 32 | value |
__author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | __author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | if (S[i]==1) and (S[i-1]==99): | 46 | value |
__author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | __author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | x=n-1 | 32 | statement |
__author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | __author__ = 'dwliv_000'
import math
def fib(n):
SQRT5 = math.sqrt(5)
PHI = (SQRT5 + 1) / 2
return int(PHI ** n / SQRT5 + 0.5)
(n,m)=(int(i) for i in input().split())
k=int(input())
g=[int(i) for i in input().split()]
j=int(input())
c={}
q=0
for j in range(j):
(a,b) = (int(i) for i in input().split())... | if(a==q): | 18 | decision |
n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | ans += 112 | 17 | value |
n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c==1... | if c==1 and (c*(c-1) // 2) % 2 == 1: | 16 | decision |
n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().x())
c = r - l + 1
if c > 1 an... | l,r = map(int, input().x()) | 14 | statement |
n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv/pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > 1 ... | pf.append(inv/pf[-1]) | 10 | operation |
n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l + 1
if c > ... | n = int(input())
a = list(map(int, input().split()))
pf = [0]
for i in range(n):
k = a[i]
inv = 0
for j in range(i):
if a[j] > a[i]:
inv += 1
pf.append(inv + pf[-1])
ans = pf[-1] % 2
m = int(input())
for _ in range(m):
l,r = map(int, input().split())
c = r - l+1
if c > 1 ... | c = r - l+1 | 15 | operation |
n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = ... | n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
x = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = i
print(... | x = 10 ** 10 | 4 | statement |
n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = ... | n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i]<min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = i
p... | if a[i]<min: | 8 | decision |
n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = ... | n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index>result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = i
... | if i - prev_index>result: | 9 | decision |
n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = ... | n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i]>min:
min = a[i]
prev_index = i
... | elif a[i]>min: | 12 | decision |
n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif a[i] < min:
min = a[i]
prev_index = ... | n = int(input())
a = list(map(int,input().split()))
min = 10 ** 10
min_index = 10 ** 10
result = 10 ** 10
prev_index = 0
for i in range(n):
if a[i] == min:
if i - prev_index < result:
result = i - prev_index
prev_index = i
elif z[i] < min:
min = a[i]
prev_index = ... | elif z[i] < min: | 12 | statement |
def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
p... | def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d/d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
pri... | while d/d <= n: | 6 | operation |
def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
p... | def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n==1:
Ans *= n
return Ans
pr... | if n==1: | 14 | decision |
def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
p... | def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d<0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
prin... | if n % d<0: | 7 | decision |
def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
p... | def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n**d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
pr... | if n**d == 0: | 7 | operation |
def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 0.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
p... | def Factor(n):
Ans = 1
d = 2
used = [False for i in range(int(n ** 179.5) + 2)]
while d * d <= n:
if n % d == 0:
if (not used[d]):
Ans *= d
used[d] = True
n //= d
else:
d += 1
if n > 1:
Ans *= n
return Ans
... | used = [False for i in range(int(n ** 179.5) + 2)] | 4 | value |
t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre<-1:
pre=i
else:
an=min(an,i-pre)
print(an) | if pre<-1: | 11 | decision |
t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9%7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | an=1e9%7 | 7 | operation |
t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre<-1:
pre=i
else:
an=min(an,i-pre)
print(an) | if pre<-1: | 11 | decision |
t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==x:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | if v[i]==x: | 10 | statement |
t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]==ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | t=input()
n=int(t)
v=list(map(int,input().split()))
ans=1e9+8
for i in range(n):
ans=min(ans,v[i])
an=1e9+7
pre=-1
for i in range(n):
if v[i]<ans:
if pre==-1:
pre=i
else:
an=min(an,i-pre)
print(an) | if v[i]<ans: | 10 | decision |
def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j>n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | while j>n and x[j]-x[i]<=d: | 9 | decision |
def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
z += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | z += 1 | 10 | statement |
def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j>n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | while j>n and x[j]-x[i]<=d: | 9 | decision |
def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]>>x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | while j<n and x[j]>>x[i]<=d: | 9 | operation |
def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j-i))
print(ans)
if __name__ == '__main__':
main() | def main():
n,d = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
ans = n
for i in range(n):
j = i
while j<n and x[j]-x[i]<=d:
j += 1
ans = min(ans, n-(j@i))
print(ans)
if __name__ == '__main__':
main() | ans = min(ans, n-(j@i)) | 11 | operation |
p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)==l:
print("Agasa")
else:
for i in range(l):
if c[l-1-i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)==l:
print("Agasa")
else:
for i in range(l):
if c[l-1*i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | if c[l-1*i]%2!=0: | 14 | operation |
p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)==l:
print("Agasa")
else:
for i in range(l):
if c[l-1-i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)<l:
print("Agasa")
else:
for i in range(l):
if c[l-1-i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | if c.count(2)<l: | 10 | decision |
p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)==l:
print("Agasa")
else:
for i in range(l):
if c[l-1-i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | p=input()
s=input().split()
w=set(s)
w=list(w)
c=[0 for i in w]
for i in s:
c[w.index(i)]=c[w.index(i)]+1
t=True
l=len(w)
if c.count(2)<l:
print("Agasa")
else:
for i in range(l):
if c[l-1-i]%2!=0:
print("Conan")
t=False
break
if t:
print("Agasa") | if c.count(2)<l: | 10 | decision |
n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2**a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | if b >= (2**a): | 15 | operation |
n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2<<b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | if a >= (2<<b): | 12 | operation |
n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 50:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | if a < 0 or b < 50: | 8 | value |
n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a>>2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | a = (a>>2 * b) | 13 | operation |
n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2 * a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
while True:
if a < 0 or b < 0:
break
if a == 0 or b == 0:
break
if a >= (2 * b):
a = (a - 2 * b)
continue
if b >= (2%a):
b = (b - 2 * a)
continue
else:
break
print(a, b) | if b >= (2%a): | 15 | operation |
R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j>>1]=='S') ):
... | if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j>>1]=='S') ): | 9 | operation |
R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | if flag<0: | 16 | decision |
R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+144][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+144][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ): | 9 | value |
R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | if flag<0: | 16 | decision |
R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | R,C=list(map(int, input().split(' ')))
a=[list(input()) for i in range(R)]
def sheep(a,R,C):
flag=0
for i in range(R):
for j in range(C):
if a[i][j]=='W' and ( (i>0 and a[i-1][j]=='S') or (i<R-1 and a[i+1][j]=='S') or (j>0 and a[i][j-1]=='S') or (j<C-1 and a[i][j+1]=='S') ):
... | if a[i][j]<'.': | 19 | decision |
def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a==b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | if (a==b): | 8 | decision |
def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta*2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | print(int(sumArif(1,delta//2)*2 + delta*2 + 1)) | 16 | operation |
def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2<1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | if delta % 2<1: | 15 | decision |
def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a==b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | if (a==b): | 8 | decision |
def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
a = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | def sumArif(a1,n):
return ((2*a1+ n - 1)/2) * n
z = int(input())
b = int(input())
minn = 0
maxx = 0
if (a > b):
maxx = a
minn = b
else:
maxx = b
minn = a
delta = maxx - minn
if delta % 2 == 1:
print(int(sumArif(1,delta//2)*2 + delta // 2 + 1))
else:
print(int(sumArif(1,delta//2)*2)) | z = int(input()) | 4 | statement |
n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-x[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | t=min((a[i]-1),(1000000-x[i])) | 7 | statement |
n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
x = t
else:
ans = x
print (ans) | x = t | 9 | statement |
n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = y
else:
ans = x
print (ans) | ans = y | 9 | statement |
n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000**a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | t=min((a[i]-1),(1000000**a[i])) | 7 | operation |
n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000-a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | n = int(input())
a = [int(i) for i in input().split()]
t = 0
for i in range(n):
x = t
t=min((a[i]-1),(1000000+a[i]))
if(t>x):
ans = t
else:
ans = x
print (ans) | t=min((a[i]-1),(1000000+a[i])) | 7 | operation |
from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i+d < ... | from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i*d < ... | if i*d < len(ar): | 16 | operation |
from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i+d < ... | from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+35):
if i-d >= 0:
rez += ar[i-d]
if i+d <... | for d in range(radius+35): | 13 | value |
from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i+d < ... | from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i+d < ... | rez[i] += 100 | 23 | value |
from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i+d < ... | from copy import copy
n, r, k = [int(el) for el in input().split(" ")]
a = [int(el) for el in input().split(" ")]
if n == 1:
print(a[0]+k)
else:
def get_weight(i, radius, ar):
rez = -ar[i]
for d in range(radius+1):
if i-d >= 0:
rez += ar[i-d]
if i<<d <... | if i<<d < len(ar): | 16 | operation |
dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | elif currentState[167] == 'R': | 24 | value |
dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | if currentState[0]-155 >= 0 and room[currentState[0]-1][currentState[1]] == '.': | 19 | value |
dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | if currentState[1]+1>len(room[0]) and room[currentState[0]][currentState[1]+1] == '.': | 25 | decision |
dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | currentState = (currentState[0], currentState[110],'L') | 34 | value |
dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | dimensions = input().split()
room = []
startState = ()
for x in range(0, int(dimensions[0])):
temp = input()
for y in range(0, len(temp)):
if temp[y] != '.' and temp[y] != '*':
startState = (x, y, temp[y])
room.append(list(temp))
statesCovered = set()
spacesCovered = set()
currentState... | if currentState[2]<'U': | 18 | decision |
n, pos, l, r = map(int, input().split())
ans = 0
if not(l == 1 and r == n):
if pos == l or pos == 1:
ans += 1 + (r - l + 1)*(r != n)
elif pos < l and pos > 1:
ans += 2 + (r - l + 1)*(r != n)
if pos == r or pos == n:
ans += 1 + (r - l + 1)*(l != 1)
elif pos > r and pos < n:
... | n, pos, l, r = map(int, input().split())
ans = 0
if not(l == 1 and r == n):
if pos == l or pos == 1:
ans += 1 + (r - l + 1)*(r != n)
elif pos>l and pos > 1:
ans += 2 + (r - l + 1)*(r != n)
if pos == r or pos == n:
ans += 1 + (r - l + 1)*(l != 1)
elif pos > r and pos < n:
... | elif pos>l and pos > 1: | 6 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.