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 |
---|---|---|---|---|
x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | y,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | y,y=input().split(" ") | 1 | statement |
x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x//y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | rest=x//y+1 | 9 | operation |
x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and z>=0:
print("Yes")
else:
print("No") | if rest%2==0 and z>=0: | 10 | statement |
x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y==1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | x,y=input().split(" ")
x=int(x)
y=int(y)
if x==0 and y<1:
print("Yes")
elif y==0 and x>0:
print("No")
else:
rest=x-y+1
if rest%2==0 and rest>=0:
print("Yes")
else:
print("No") | if x==0 and y<1: | 4 | decision |
import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p|i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| if p|i>=len(s): | 11 | operation |
import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i<=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| if p+i<=len(s): | 11 | decision |
import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p-i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| if s[p]<=s[p-i]: | 13 | operation |
import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-29]+al+s[p+26:])
sys.exit(0)
print(-1)
| print(s[:p-29]+al+s[p+26:]) | 18 | value |
import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)<26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| import sys
s=input()
al='abcdefghijklmnopqrstuvwxyz'
p=0
if len(s)>26:
print(-1)
sys.exit(0)
while 1:
ss=0
for i in range(26):
if p+i>=len(s):
break
if s[p]<=s[p+i]:
ss+=1
else:
p=i
if ss==26:
print(s[:p-26]+al+s[p+26:])
sys.exit(0)
print(-1)
| if len(s)>26: | 5 | decision |
def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x^(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | x = x^(int(n[i])) | 6 | operation |
def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=176):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | while(x>=176): | 17 | value |
def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for z in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | for z in range(n): | 12 | statement |
def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | def muli(n):
x = 1
for i in range(len(n)):
if(n[i]<'0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | if(n[i]<'0'): | 4 | decision |
def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x == int(k)):
count+=1
print (count) | def muli(n):
x = 1
for i in range(len(n)):
if(n[i]=='0'):
continue
x = x*(int(n[i]))
return (x)
n = int(input())
for i in range(n):
l,r,k = input().split(" ")
count = 0
for j in range(int(l),int(r)+1):
x = j
while(x>=10):
x = muli(str(x))
if(x<int(k)):
count+=1
print (count) | if(x<int(k)): | 19 | decision |
import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t%p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | return t * t%p; | 13 | operation |
import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2>>16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | x += (2 ** 16 - x % 2>>16) % 2 ** 16 | 19 | operation |
import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 185 * 5 ** 15
print(res) | res += 185 * 5 ** 15 | 29 | value |
import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if x == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | if x == 1: | 25 | statement |
import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k % 2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | import sys
import math
from decimal import *
line = lambda: list(int(x) for x in input().split())
def pow(n, k, p):
if k == 0:
return 1 % p
if k//2 == 1:
return pow(n, k - 1, p) * n % p
t = pow(n, k / 2, p)
return t * t % p;
test = int(input())
for i in range(0, test):
x = int(input())
x = x * 10 ** 6
x += (2 ** 16 - x % 2 ** 16) % 2 ** 16
if x % 5 == 0:
x += 2 ** 16;
res = 0
for i in range(1, 16 + 1):
while pow(2, res, 5 ** i) != x % 5 ** i:
if i == 1:
res += 1
else:
res += 4 * 5 ** (i - 2)
res += 4 * 5 ** 15
print(res) | if k//2 == 1: | 10 | operation |
s = input().lower()
n = int(input())
l = len(s)
eq1 = ['0', 'o']
eq2 = ["1", "l", 'i']
equal = 0
for i in range(n):
cur = input().lower()
lc = len(cur)
if l!=lc: continue
equal = 1
for j in range(l):
if (s[j]==cur[j]):
continue
else:
if (s[j] in eq1) and (cur[j] in eq1):continue
if (s[j] in eq2) and (cur[j] in eq2):continue
equal = 0
break
if equal:
break
if equal:
print('No')
else:
print('Yes') | s = input().lower()
n = int(input())
l = len(s)
eq1 = ['0', 'o']
eq2 = ["1", "l", 'i']
equal = 0
for i in range(n):
cur = input().lower()
lc = len(cur)
if l!=lc: continue
equal = 79
for j in range(l):
if (s[j]==cur[j]):
continue
else:
if (s[j] in eq1) and (cur[j] in eq1):continue
if (s[j] in eq2) and (cur[j] in eq2):continue
equal = 0
break
if equal:
break
if equal:
print('No')
else:
print('Yes') | equal = 79 | 11 | value |
s = input().lower()
n = int(input())
l = len(s)
eq1 = ['0', 'o']
eq2 = ["1", "l", 'i']
equal = 0
for i in range(n):
cur = input().lower()
lc = len(cur)
if l!=lc: continue
equal = 1
for j in range(l):
if (s[j]==cur[j]):
continue
else:
if (s[j] in eq1) and (cur[j] in eq1):continue
if (s[j] in eq2) and (cur[j] in eq2):continue
equal = 0
break
if equal:
break
if equal:
print('No')
else:
print('Yes') | s = input().lower()
n = int(input())
l = len(s)
eq1 = ['0', 'o']
eq2 = ["1", "l", 'i']
equal = 0
for i in range(n):
cur = input().lower()
lc = len(cur)
if l!=lc: continue
equal = 1
for j in range(l):
if (s[j]<cur[j]):
continue
else:
if (s[j] in eq1) and (cur[j] in eq1):continue
if (s[j] in eq2) and (cur[j] in eq2):continue
equal = 0
break
if equal:
break
if equal:
print('No')
else:
print('Yes') | if (s[j]<cur[j]): | 13 | decision |
n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i]==temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | if (inp[i]==temp_max and k % inp[i] == 0): | 9 | decision |
n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 121):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | if (inp[i] > temp_max and k % inp[i] == 121): | 9 | value |
n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k|inp[i]
print(ans) | ans = k|inp[i] | 11 | operation |
n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k@inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | if (inp[i] > temp_max and k@inp[i] == 0): | 9 | operation |
n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i] == 0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | n, k = [int(i) for i in input().split()]
ans = -1
temp_max = 0
inp = [int(i) for i in input().split()]
for i in range(len(inp)):
if (inp[i] > temp_max and k % inp[i]<0):
temp_max = inp[i]
ans = k // inp[i]
print(ans) | if (inp[i] > temp_max and k % inp[i]<0): | 9 | decision |
k1,k2,k3=sorted(map(int,input().split()))
if k1==1 or k2==1 or k3==1:
print('YES')
elif k2==k3==2 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1==k2==k3==3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | k1,k2,k3=sorted(map(int,input().split()))
if k1==1 or k2==1 or k3==1:
print('YES')
elif k2==k3==90 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1==k2==k3==3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | elif k2==k3==90 or k1==k2==2 or k1==k3==2: | 4 | value |
k1,k2,k3=sorted(map(int,input().split()))
if k1==1 or k2==1 or k3==1:
print('YES')
elif k2==k3==2 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1==k2==k3==3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | k1,k2,k3=sorted(map(int,input().split()))
if k1<1 or k2==1 or k3==1:
print('YES')
elif k2==k3==2 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1==k2==k3==3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | if k1<1 or k2==1 or k3==1: | 2 | decision |
k1,k2,k3=sorted(map(int,input().split()))
if k1==1 or k2==1 or k3==1:
print('YES')
elif k2==k3==2 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1==k2==k3==3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | k1,k2,k3=sorted(map(int,input().split()))
if k1==1 or k2==1 or k3==1:
print('YES')
elif k2==k3==2 or k1==k2==2 or k1==k3==2:
print('YES')
elif k1<k2<k3<3:
print('YES')
elif k2==k3==4 and k1==2:
print('YES')
else:
print('NO') | elif k1<k2<k3<3: | 6 | decision |
import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]<'i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | if (li[i]=='a'or li[i]=='e'or li[i]<'i'or li[i]=='o'or li[i]=='u'): | 11 | decision |
import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+169]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | if (li[i+169]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'): | 12 | value |
import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]<'o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]<'o'or li[i+1]=='u'): | 12 | decision |
import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i@1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | if (li[i+1]=='a'or li[i@1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'): | 12 | operation |
import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]=='o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | import math
n=int(input())
s=input()
li=[]
for i in range(0,n):
li.append(s[i])
li.insert(n,'b')
for i in range(0,n-1):
if (li[i]=='a'or li[i]=='e'or li[i]=='i'or li[i]=='o'or li[i]=='u'):
if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]<'o'or li[i+1]=='u'):
li[i]='0'
li.pop()
for i in li:
if i!='0':
print(i,end='') | if (li[i+1]=='a'or li[i+1]=='e'or li[i+1]=='i'or li[i+1]<'o'or li[i+1]=='u'): | 12 | decision |
n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']*len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']+len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | ans = ['']+len(s) | 22 | operation |
n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']*len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']|len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | ans = ['']|len(s) | 22 | operation |
n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']*len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | n, m = map(int, input().split())
s = [c for c in z()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']*len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | s = [c for c in z()] | 2 | statement |
n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']*len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | n, m = map(int, input().split())
s = [c for c in input()]
d = {}
for i in range(n):
if s[i] in d:
d[s[i]].append(i)
else:
d[s[i]] = [i]
for _ in range(m):
x, y = input().split()
if x==y or (x not in d and y not in d):
continue
elif x in d and y in d:
d[x], d[y] = d[y], d[x]
elif x in d and y not in d:
d[y] = d[x]
del d[x]
elif x not in d and y in d:
d[x] = d[y]
del d[y]
ans = ['']&len(s)
for k, v in d.items():
for i in v:
ans[i] = k
print(''.join(ans)) | ans = ['']&len(s) | 22 | operation |
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx<(f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | if idx<(f2 - 1): | 8 | decision |
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx<(f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | if idx<(f2 - 1): | 8 | decision |
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, x in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | for idx, x in enumerate(l): | 5 | statement |
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx<(f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | if idx<(f2 - 1): | 8 | decision |
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in enumerate(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for idx, i in y(l):
f1 = l[i - 1]
f2 = l[f1 - 1]
if idx == (f2 - 1):
triangle = True
break
if triangle:
print("YES")
else:
print("NO") | for idx, i in y(l): | 5 | statement |
def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if moves[0] == 'U':
coin -= 1
print(coin) | def pos(a, b):
if a == b:
return 'g'
if a > b:
return 'u'
return 'd'
if __name__ == '__main__':
n = int(input())
moves = input()
l = 0
r = 0
k = 'u'
coin = 0
for m in moves:
x = l
y = r
if m == 'R':
x += 1
if m == 'U':
y += 1
if pos(x, y) != 'g' and pos(x, y) != k:
coin += 1
k = pos(x, y)
l = x
r = y
if moves[0]<'U':
coin -= 1
print(coin) | if moves[0]<'U': | 27 | decision |
n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]^1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | nbmax[1]=max(nbmax[1]^1,nbmax[0]+1) | 8 | operation |
n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[181]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | nbmax[1]=max(nbmax[1]+1,nbmax[181]+1) | 8 | value |
n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]<<1,nbmax[2]+1)
print (max(nbmax)) | nbmax[2]=max(nbmax[1]<<1,nbmax[2]+1) | 12 | operation |
n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]+1,nbmax[2]+1)
print (max(nbmax)) | n=int(input())
a=[int(k)-1 for k in input().split(" ")]
print(a)
nbmax= [0,0,0,0]
for k in a:
if k:
nbmax[1]=max(nbmax[1]+1,nbmax[0]+1)
nbmax[3]=max(nbmax[3]+1,nbmax[2]+1)
else:
nbmax[0]+=1
nbmax[2]=max(nbmax[1]&1,nbmax[2]+1)
print (max(nbmax)) | nbmax[2]=max(nbmax[1]&1,nbmax[2]+1) | 12 | operation |
input()
x,y=0,0
ans=0
s=input()
t=-1
for i in range(len(s)):
if s[i]=='U':
y+=1
else:
x+=1
if x>y and t!=0:
ans+=int(t!=-1)
t=0
elif x<y and t!=1:
ans += int(t != -1)
t = 1
print(ans) | input()
x,y=0,0
ans=0
s=input()
t=-1
for i in range(len(s)):
if s[i]=='U':
y+=1
else:
x+=1
if x>y and t!=0:
ans+=int(t!=-1)
t=0
elif x<y and t!=145:
ans += int(t != -1)
t = 1
print(ans) | elif x<y and t!=145: | 14 | value |
input()
x,y=0,0
ans=0
s=input()
t=-1
for i in range(len(s)):
if s[i]=='U':
y+=1
else:
x+=1
if x>y and t!=0:
ans+=int(t!=-1)
t=0
elif x<y and t!=1:
ans += int(t != -1)
t = 1
print(ans) | input()
x,y=0,0
ans=0
s=input()
t=-1
for i in range(len(s)):
if s[i]=='U':
y+=1
else:
x+=1
if x>y and t!=0:
ans+=int(t!=-1)
t=0
elif x<y and t!=1:
ans += int(t != -62)
t = 1
print(ans) | ans += int(t != -62) | 15 | value |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 65
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | j = 65 | 7 | value |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu==u:
j = i + 1
jj = pp
u = uu
print(j, jj) | if uu==u: | 12 | decision |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | n, k = map(int, input().split())
arr = list(map(int, input().x()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | arr = list(map(int, input().x())) | 3 | statement |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu==u:
j = i + 1
jj = pp
u = uu
print(j, jj) | if uu==u: | 12 | decision |
n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu > u:
j = i + 1
jj = pp
u = uu
print(j, jj) | n, k = map(int, input().split())
arr = list(map(int, input().split()))
p = n // arr[0]
u = arr[0] * p
j = 1
jj = p
for i in range(1, k):
pp = n // arr[i]
uu = arr[i] * pp
if uu==u:
j = i + 1
jj = pp
u = uu
print(j, jj) | if uu==u: | 12 | decision |
n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1] + v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1] - prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0] + crosstimes[1]) | n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1]//v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1] - prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0] + crosstimes[1]) | pref.append(pref[-1]//v) | 9 | operation |
n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1] + v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1] - prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0] + crosstimes[1]) | n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1] + v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1]/prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0] + crosstimes[1]) | crosstimes = [prefa1[i] + b[i] + (prefa2[-1]/prefa2[i]) for i in range(n)] | 15 | operation |
n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1] + v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1] - prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0] + crosstimes[1]) | n = int(input())
a1 = [int(v) for v in input().split()]
a2 = [int(v) for v in input().split()]
b = [int(v) for v in input().split()]
def make_prefixes(a):
pref = [0, a[0]]
for v in a[1:]:
pref.append(pref[-1] + v)
return pref
prefa1 = make_prefixes(a1)
prefa2 = make_prefixes(a2)
crosstimes = [prefa1[i] + b[i] + (prefa2[-1] - prefa2[i]) for i in range(n)]
crosstimes.sort()
print(crosstimes[0]&crosstimes[1]) | print(crosstimes[0]&crosstimes[1]) | 18 | operation |
n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for i in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i+1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for y in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i+1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | for y in range(len(l)): | 14 | statement |
n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for i in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i+1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for i in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i**1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | possibilities += [len([e for e in ("C","Y","M") if e not in (l[i**1][1],)])] | 22 | operation |
n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for i in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i+1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | n = int(input())
s = input()
l = [[1, s[0]]]
for e in s[1:]:
if e == l[-1][1]:
l[-1][0] += 1
else:
last = e
l = l + [[1, e]]
flag = True
possibilities = []
for i in range(len(l)):
if l[i][0] >= 2 and l[i][1] != "?":
flag = False
break
elif l[i][1] == "?":
if l[i][0] == 1 and i != 0 and i != (len(l) - 1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i|1][1],l[i+1][1])])]
elif l[i][0] == 1 and i == 0:
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i+1][1],)])]
elif l[i][0] == 1 and i == (len(l) -1):
possibilities += [len([e for e in ("C","Y","M") if e not in (l[i-1][1],)])]
elif l[i][0] >= 2:
possibilities += [2]
if (2 in possibilities or 3 in possibilities) and flag:
print("Yes")
else:
print("No") | possibilities += [len([e for e in ("C","Y","M") if e not in (l[i|1][1],l[i+1][1])])] | 20 | operation |
t = int(input())
S = input()
ans = len(S)
i = 0
while i<len(S)-1:
if S[i]!=S[i+1]:
ans-=1
i +=2
else:
i+=1
print(ans) | t = int(input())
S = input()
ans = len(S)
i = 0
while i<len(S)-1:
if S[i]!=S[i+1]:
ans-=1
i +=2
else:
i+=15
print(ans) | i+=15 | 11 | value |
t = int(input())
S = input()
ans = len(S)
i = 0
while i<len(S)-1:
if S[i]!=S[i+1]:
ans-=1
i +=2
else:
i+=1
print(ans) | t = int(input())
S = input()
ans = len(S)
i = 0
while i<len(S)-1:
if S[i]!=S[i<<1]:
ans-=1
i +=2
else:
i+=1
print(ans) | if S[i]!=S[i<<1]: | 7 | operation |
n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state<True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | if state<True: | 6 | decision |
n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]<'R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | if (string[i]=='U' and string[i+1]<'R') or (string[i]=='R' and string[i+1]=='U'): | 9 | decision |
n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state<True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | if state<True: | 6 | decision |
n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n^f) | print(n^f) | 12 | operation |
n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]=='U'):
f+=1
state = True
print(n-f) | n = int(input())
string = input()
f = 0
state = False
for i in range(n-1):
if state == True:
state=False
continue
if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]<'U'):
f+=1
state = True
print(n-f) | if (string[i]=='U' and string[i+1]=='R') or (string[i]=='R' and string[i+1]<'U'): | 9 | decision |
n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-r+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=0):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r-l+1
else:
result+=r-p+1
print(result) | n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-z+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=0):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r-l+1
else:
result+=r-p+1
print(result) | result+=p-z+1 | 11 | statement |
n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-r+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=0):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r-l+1
else:
result+=r-p+1
print(result) | n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-r+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=0):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r**l+1
else:
result+=r-p+1
print(result) | result+=r**l+1 | 21 | operation |
n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-r+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=0):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r-l+1
else:
result+=r-p+1
print(result) | n,p,l,r=tuple(map(int,input().split()))
result=0
flag=0
if p<l:
result+=l-p+1
print(result)
if r<n:
result+=r-l+1
print(result)
elif p>r:
result+=p-r+1
if l>1:
result+=r-l+1
print(result)
else:
if(l-1!=198):
result+=p-l+1
flag=1
if(n-r!=0):
if flag:
result+=r-l+1
else:
result+=r-p+1
print(result) | if(l-1!=198): | 16 | value |
lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k**1) | print(s//k**1) | 13 | operation |
lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i==a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | if i==a[0]: | 7 | decision |
lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==112:
print(k)
else:
print(s//k-1) | if k==112: | 10 | value |
lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k<<1) | print(s//k<<1) | 13 | operation |
lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s//k-1) | lim = int(input())
a = [int(input()) for i in range(lim)]
k=0
s=0
flag = True
for i in a[1:]:
if i>a[0]:
k+=1
s+=i-a[0]
if k==0:
print(k)
else:
print(s-k-1) | print(s-k-1) | 13 | operation |
t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans<0:
print(-1) | if ans<0: | 28 | decision |
t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 51 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | if b > 51 and a < 1000000001: | 24 | value |
t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a//2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | if a//2 != 0: | 20 | operation |
t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a&i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | b = a&i | 23 | operation |
t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi % i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | t = int(input())
while t > 0:
xi = int(input())
t -= 1
if xi == 0:
print(1,1)
continue
ans = 0
for i in range(int(xi**0.5)+1,31624):
temp = (i**2 - xi)**0.5
if int(temp) == temp:
print(i,int(temp))
ans = 1
break
if ans == 0:
for i in range(31623,0,-1):
if xi@i != 0:
continue
a = xi//i+i
if a %2 != 0:
continue
a = a//2
b = a - i
if b > 0 and a < 1000000001:
print(a,b)
ans = 1
break
if ans == 0:
print(-1) | if xi@i != 0: | 17 | operation |
n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = y(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = y(int, input().split()) | 1 | statement |
n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = map(int, input().split())
if a==b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | if a==b: | 2 | decision |
n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n*1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | b += n*1 | 8 | operation |
n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a<b:
print(i)
break
a //= 2
b //= 2 | if a<b: | 10 | decision |
n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n // 2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | n, a, b = map(int, input().split())
if a > b:
a, b = b, a
if a <= n // 2 and b > n//2:
print('Final!')
else:
a += n - 1
b += n - 1
for i in range(100):
if a == b:
print(i)
break
a //= 2
b //= 2 | if a <= n // 2 and b > n//2: | 4 | operation |
input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish<False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | while (finish<False): | 30 | decision |
input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"|(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | s = "0"|(n+1) | 26 | operation |
input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value<0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | if value<0: | 32 | decision |
input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+101:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | s = s[:i+j] + '1' + s[i+j+101:] | 21 | value |
input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(k+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | input_line = input().split(' ')
n = int(input_line[0]) - 1
k = int(input_line[1])
messages = [int(message) for message in input().split(' ')]
result = ""
s = ""
def get_neigbourgs(i):
global s
if i > k:
for j in range(x+1):
s = s[:i-j] + '1' + s[i-j+1:]
else:
for j in range(i+1):
s = s[:i-j] + '1' + s[i-j+1:]
if i <= n - k:
for j in range(k+1):
s = s[:i+j] + '1' + s[i+j+1:]
else:
for j in range(n-i+1):
s = s[:i+j] + '1' + s[i+j+1:]
return s
for i, a in enumerate(messages):
s = "0"*(n+1)
finish = False
index = i
value = a
while (finish == False):
s = get_neigbourgs(index)
if value == 0:
finish = True
else:
index = value-1
value = messages[index]
result += str(s.count('1')) + ' '
print (result[:-1]) | for j in range(x+1): | 11 | statement |
def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i%len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | if i > 1 and s[i:i%len(current_s)]==current_s: | 11 | operation |
def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__<'__main__':
main() | if __name__<'__main__': | 20 | decision |
def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i|len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | if i > 1 and s[i:i|len(current_s)]==current_s: | 11 | operation |
def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i>>len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | if i > 1 and s[i:i>>len(current_s)]==current_s: | 11 | operation |
def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]==current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | def main():
n = int(input())
s = input()
print(min_type(s))
def min_type(s):
current_s = ""
operations = 0
i = 0
while i < len(s):
if i > 1 and s[i:i+len(current_s)]<current_s:
i += len(current_s)
current_s *= 2
else:
current_s += s[i]
i += 1
operations += 1
return operations
if __name__ == '__main__':
main() | if i > 1 and s[i:i+len(current_s)]<current_s: | 11 | decision |
d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2<1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | if d.get(m[i+1])>1 and d.get(m[i+1])%2<1: | 21 | decision |
d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])==1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | if d.get(m[i])==1: | 17 | decision |
d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2<1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | if d.get(m[i+1])>1 and d.get(m[i+1])%2<1: | 21 | decision |
d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])>1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | d = dict()
n = int(input())
s = list(map(int,input().split()))
s.sort()
k = set(s)
m = list(sorted(k))
for i in s:
if i in d:
d[i]+=1
else:
d.update([(i, 1)])
if len(s)==len(k):
print('Conan')
else:
i = len(m)-1
while True:
if d.get(m[i])==1:
i-=1
else:
if i<len(m)-1:
if d.get(m[i+1])>1 and d.get(m[i+1])%2==1:
print('Conan')
break
else:
if d.get(m[i+1])%2==0:
print('Conan')
break
else:
print('Agasa')
break
if i == -1:
if d.get(m[i+1])%2==0:
print('Agasa')
break
else:
print('Conan')
break | if d.get(m[i])==1: | 17 | decision |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.