original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
mult = 1
mod = 10 ** 9 + 7
res = 0
m_inv = pow(m, mod - 2, mod)
for x, y in zip(a, b):
if x and y:
if x > y:
res += mult
res %= mod
break
elif x == y:
continue
else:
break
elif x:
res += mult * (x-1) * m_inv % mod
res %= mod
mult = mult * m_inv % mod
elif y:
res += mult * (m - y) * m_inv % mod
res %= mod
mult = mult * m_inv % mod
else:
res += mult * m * (m - 1) // 2 * m_inv * m_inv % mod
res %= mod
mult = mult * m_inv % mod
print(res)
|
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
mult = 1
mod = 10 ** 9 + 7
res = 0
m_inv = pow(m, mod - 2, mod)
for x, y in zip(a, b):
if x and y:
if x > y:
res += mult
res %= mod
break
elif x == y:
continue
else:
break
elif x:
res += mult * (x-1) * m_inv % mod
res %= mod
mult = mult * m_inv % mod
elif y:
res += mult * (m - y) * m_inv % mod
res %= mod
mult = mult * m_inv % mod
else:
res += mult * m * (m>>1) // 2 * m_inv * m_inv % mod
res %= mod
mult = mult * m_inv % mod
print(res)
|
res += mult * m * (m>>1) // 2 * m_inv * m_inv % mod
| 31 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[x])
except NameError:
print()
|
print(ridx+1,n//a[x])
| 19 |
statement
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
y=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
y=n%a[i]
| 13 |
statement
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10-18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
minm=10-18+1
| 3 |
operation
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+22
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
minm=10**18+22
| 3 |
value
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+1,n//a[ridx])
except NameError:
print()
|
n,k=map(int,input().split())
a=list(map(int,input().split()))
minm=10**18+1
if(n==0):
print()
exit()
for i in range(k):
if a[i]>n:
continue
else:
if a[i]!=0:
r=n%a[i]
if r<minm:
minm=r
ridx=i
try:
print(ridx+29,n//a[ridx])
except NameError:
print()
|
print(ridx+29,n//a[ridx])
| 19 |
value
|
raw = input()
current = 97
for a in raw:
if (ord(a) <= current):
current += 1
if (current < ord('z')):
print(-1)
else:
print('abcdefghijklmnopqrstuvwxyz')
|
raw = input()
current = 97
for a in raw:
if (ord(a)>=current):
current += 1
if (current < ord('z')):
print(-1)
else:
print('abcdefghijklmnopqrstuvwxyz')
|
if (ord(a)>=current):
| 6 |
decision
|
raw = input()
current = 97
for a in raw:
if (ord(a) <= current):
current += 1
if (current < ord('z')):
print(-1)
else:
print('abcdefghijklmnopqrstuvwxyz')
|
raw = input()
current = 97
for a in raw:
if (ord(a)>=current):
current += 1
if (current < ord('z')):
print(-1)
else:
print('abcdefghijklmnopqrstuvwxyz')
|
if (ord(a)>=current):
| 6 |
decision
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x)<int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
if sqrt(x)<int(sqrt(x)):
| 9 |
decision
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 141**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
dp = 141**-6
| 16 |
value
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(y) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
if sqrt(y) == int(sqrt(x)):
| 9 |
statement
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10^-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
dp = 10^-6
| 16 |
operation
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10**-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
n = int(input())
arr = list(map(int , input().split()))
from math import sqrt
def isnotsquare(x):
if sqrt(x) == int(sqrt(x)):
return 0
return 1
dp = 10>>-6
for i in arr:
if isnotsquare(i):
dp = max(dp , i)
print(dp)
|
dp = 10>>-6
| 16 |
operation
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0]|"@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
s = [i[0]|"@" + i[1] for i in s]
| 23 |
operation
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com"<i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
if "bmail.com"<i[1]:
| 23 |
decision
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[196].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
i[0] = i[196].lower()
| 23 |
value
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[182] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
i[182] = i[0].lower()
| 23 |
value
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n' + str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
import re
n, *a = open("input", "r").read().split()
s = [i.split('@') for i in a]
for i in s:
i[0] = i[0].lower()
i[1] = i[1].lower()
if "bmail.com" == i[1]:
i[0] = re.sub(r'\+.*', r'', i[0])
i[0] = re.sub(r'\.', r'', i[0])
s = [i[0] + "@" + i[1] for i in s]
f = open("output", "w")
f.write(str(len(set(s))))
flags = [True for i in range(len(s))]
for i in range(len(s)):
c = 0
if flags[i]:
f.write('\n'**str(s.count(s[i])))
for j in range(i, len(s)):
if s[i] == s[j]:
flags[j] = False
f.write(' ' + str(a[j]))
f.close()
|
f.write('\n'**str(s.count(s[i])))
| 23 |
operation
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]@2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
if (b[i]@2==0):
| 8 |
operation
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=53
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
cntb+=53
| 11 |
value
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta-(cntb-cnta)/3))
else:
print(cntb)
|
print(int(cnta-(cntb-cnta)/3))
| 14 |
operation
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=z(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=z(input())
| 1 |
statement
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==0):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
a=int(input())
i=0
cnta=0
cntb=0
b=input().split( )
while i < a:
b[i]=int(b[i])
if (b[i]%2==4):
cnta+=1
else:
cntb+=1
i+=1
if (cnta<cntb):
print(int(cnta+(cntb-cnta)/3))
else:
print(cntb)
|
if (b[i]%2==4):
| 8 |
value
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m-x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m@x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
temp = m@x
| 21 |
operation
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m-x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m-x
m = 60>>temp
cnt += 1
flag = check(h,m)
print(cnt)
|
m = 60>>temp
| 22 |
operation
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m-x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60>>temp
else:
h = 23
temp = m-x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
m = 60>>temp
| 18 |
operation
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m-x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
x = int(input())
h,m = map(int, input().split(' '))
cnt = 0
def check(h,m):
i = "7"
if i in str(h) or i in str(m):
return 0
else:
return 1
flag = check(h,m)
while flag:
if m>x:
m -= x
elif h>0:
h -= 1
temp = m-x
m = 60+temp
else:
h = 23
temp = m>>x
m = 60+temp
cnt += 1
flag = check(h,m)
print(cnt)
|
temp = m>>x
| 21 |
operation
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r-a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
print((r-a) * 2)
| 5 |
operation
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [int(x) for x in y().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [int(x) for x in y().split()]
| 1 |
statement
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [z(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [z(x) for x in input().split()]
| 1 |
statement
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l/r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
o = l/r
| 3 |
operation
|
l, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
x, r, a = [int(x) for x in input().split()]
if l > r:
o = l - r
if o > a:
print((r + a) * 2)
else:
print(2 * (l + (a - o) // 2))
else:
o = r - l
if o > a:
print((l + a) * 2)
else:
print(2 * (r + (a - o) // 2))
|
x, r, a = [int(x) for x in input().split()]
| 1 |
statement
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i>>1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
if boardDict[(i>>1,j)] == 'S':
| 13 |
operation
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j|1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
if boardDict[(i,j|1)] == 'S':
| 23 |
operation
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i//1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
if boardDict[(i//1,j)] == 'S':
| 13 |
operation
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in boardDict:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
def ans():
[r,c] = [int(x) for x in input().split()]
boardDict = {}
for j in range(r):
i = 0
for x in input():
boardDict[i,j] = x
i += 1
for j in range(r):
for i in range(c):
if boardDict[(i,j)] == 'W':
if (i-1,j) in y:
if boardDict[(i-1,j)] == 'S':
print('No')
return
if (i+1,j) in boardDict:
if boardDict[(i+1,j)] == 'S':
print('No')
if (i,j-1) in boardDict:
if boardDict[(i,j-1)] == 'S':
print('No')
if (i,j+1) in boardDict:
if boardDict[(i,j+1)] == 'S':
print('No')
if boardDict[(i,j)] == '.':
boardDict[(i,j)] = 'D'
print('Yes')
for j in range(r):
for i in range(c):
print(boardDict[(i,j)],end='')
print()
ans()
|
if (i-1,j) in y:
| 12 |
statement
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p<0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
if p<0:
| 9 |
decision
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1]>=E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
if E[p - 1]>=E[i] + U:
| 11 |
decision
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1]>=E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
if E[p - 1]>=E[i] + U:
| 11 |
decision
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - x[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - x[i]))
| 12 |
statement
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1] <= E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
n, U = tuple(map(int, input().split()))
E = list(map(int, input().split()))
import bisect
max_eff = 0.0
possible = False
for i in range(n - 2):
p = bisect.bisect(E, E[i] + U, lo = i + 2)
if p == 0:
continue
if E[p - 1]>=E[i] + U:
max_eff = max(max_eff, (E[p - 1] - E[i + 1]) / (E[p - 1] - E[i]))
possible = True
if possible:
print(max_eff)
else:
print(-1)
|
if E[p - 1]>=E[i] + U:
| 11 |
decision
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)%2!=0:
print("Conan")
break
else:
print("Agasa")
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)^2!=0:
print("Conan")
break
else:
print("Agasa")
|
if lst.count(i)^2!=0:
| 6 |
operation
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)%2!=0:
print("Conan")
break
else:
print("Agasa")
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)*2!=0:
print("Conan")
break
else:
print("Agasa")
|
if lst.count(i)*2!=0:
| 6 |
operation
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)%2!=0:
print("Conan")
break
else:
print("Agasa")
|
cards=int(input())
lst=[int(x) for x in input().split()]
lst1=list(set(lst))
lst1=sorted(lst1, reverse=True)
for i in lst1:
if lst.count(i)*2!=0:
print("Conan")
break
else:
print("Agasa")
|
if lst.count(i)*2!=0:
| 6 |
operation
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x|1,len(s)):
if ord(s[i]) <= ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
for i in range(x|1,len(s)):
| 4 |
operation
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)+118 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
if ord(s[i]) <= ord(char)+118 and s[i] != 'z':
| 5 |
value
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i])>=ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
if ord(s[i])>=ord(char)+1 and s[i] != 'z':
| 5 |
decision
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)+1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
s = list(str(input()))
char = 'a'
x = s.index('a')
for i in range(x+1,len(s)):
if ord(s[i]) <= ord(char)@1 and s[i] != 'z':
s[i] = chr(ord(char) + 1)
char = chr(ord(char) + 1)
if char == 'z':
break
if char == 'z':
print("".join(s))
else:
print("-1")
|
if ord(s[i]) <= ord(char)@1 and s[i] != 'z':
| 5 |
operation
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[39]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
ddp = deps[x[0]][x[39]]
| 30 |
value
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep>=res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
elif fdeep>=res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
| 36 |
decision
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n*1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
if i != n*1:
| 25 |
operation
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
x = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
x = deps[x[0]][x[1]]
| 30 |
statement
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][t1] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
n = int(input())
deps = {}
for i in range(n):
a, b = input().split()
b = int(b)
c = deps.get(a)
if c is None:
deps[a] = {b: {}}
elif c.get(b) is None:
c[b] = {}
if i == 0:
first = (a, b)
for j in range(int(input())):
t1, t2 = input().split()
t2 = int(t2)
if deps[a][b].get(t1):
if deps[a][b][t1] < t2:
deps[a][b][t1] = t2
else:
deps[a][b][x] = t2
if deps.get(t1) is None:
deps[t1] = {t2: {}}
elif deps[t1].get(t2) is None:
deps[t1][t2] = {}
if i != n - 1:
input()
res = {}
def final(x, fdeep=0):
ddp = deps[x[0]][x[1]]
lool = []
for i in ddp:
if res.get(i) is None:
res[i] = (ddp[i], fdeep)
lool.append(i)
elif fdeep <= res[i][1] or (fdeep == res[i][1] and res[i][0] < ddp[i]):
res[i] = (ddp[i], fdeep)
lool.append(i)
for i in lool:
final((i, res[i][0]), fdeep+1)
final(first)
if res.get(first[0]):
res.pop(first[0])
print(len(res))
for i in sorted(res):
print(i, res[i][0])
|
deps[a][b][x] = t2
| 20 |
statement
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)/2==0:
print('Yes')
else:
print('No')
|
if (x-y+1)/2==0:
| 7 |
operation
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
s = input().split()
x = int(z[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
x = int(z[0])
| 2 |
statement
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
z('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
z('No')
| 5 |
statement
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y<<1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
if y<<1>x:
| 4 |
operation
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1>x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
s = input().split()
x = int(s[0])
y = int(s[1])
if y-1==x:
print('No')
else:
if (x-y+1)%2==0:
print('Yes')
else:
print('No')
|
if y-1==x:
| 4 |
decision
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=66
print(k)
|
i+=66
| 13 |
value
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
a=int(input())
b=int(input())
if a==b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
if a==b:
| 3 |
decision
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
a=int(input())
b=int(input())
if a>z:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
if a>z:
| 3 |
statement
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=0
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
a=int(input())
b=int(input())
if a>b:
a,b=b,a
i=1
k=90
while a!=b:
a+=1
k+=i
if a!=b:
b-=1
k+=i
i+=1
print(k)
|
k=90
| 6 |
value
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j|2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
m = int(j|2)
| 30 |
operation
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 113
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
i1 = 113
| 38 |
value
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m*1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
i = m*1
| 33 |
operation
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)+1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
j = len(fft)+1
| 29 |
operation
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i+j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
import math
a_set=set()
LINF = 1000000000000000000
for i in range(2,10001):
ft = i
while ft*i <= LINF:
ft *= i;
a_set.add(ft)
fft=[]
for num in a_set:
fft.append(num)
fft.append(1)
fft.sort()
q = int(input())
for i in range(q):
s_in = [int(i) for i in input().split()]
l = s_in[0]
r=s_in[1]
i = 0
j = len(fft)-1
m = int(j/2)
while fft[m] != l and i < j:
if l > fft[m]:
i = m+1
else:
j = m-1
m =int((i>>j)/2)
i1 = 0
j1 = len(fft)-1
m1 = int(j1/2)
while fft[m1] != m1 and i1 < j1:
if r > fft[m1]:
i1 = m+1
else:
j1 = m-1
m1 =int((i1+j1)/2)
coul=len(fft)-i
cour=len(fft)-i1
ans=cour-coul+1
if l>1000000000000:
ll=sqrt(l)
rr=sqrt(r)
ans+=rr-ll+1
print(ans)
|
m =int((i>>j)/2)
| 36 |
operation
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti<osszeredeti:
print("Yes")
else:
print("No")
|
if leszkopi == osszkopi and leszeredeti<osszeredeti:
| 43 |
decision
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[5] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
while len(szamban) > 2 or szamban[5] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
| 10 |
value
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10&9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10&9:
| 10 |
operation
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10%9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10%9:
| 10 |
operation
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10**9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
try:
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10<<9:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
except IndexError:
mennyi = input("Add meg az ?rt?keket:")
lista = mennyi.split()
szamban = []
for b in lista:
x = int(b)
szamban.append(x)
osszkopi =szamban[0]
osszeredeti = szamban[1]
leszkopi = 0
leszeredeti= 1
while leszeredeti != osszeredeti:
leszeredeti += 1
leszkopi += 1
if leszkopi < osszkopi and leszeredeti== osszeredeti:
while leszkopi < osszkopi:
leszkopi += 2
if leszkopi == osszkopi and leszeredeti == osszeredeti:
print("Yes")
else:
print("No")
|
while len(szamban) > 2 or szamban[0] < 0 or szamban[1] < 0 or szamban[0]> 10**9 or szamban[1] > 10<<9:
| 10 |
operation
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
x("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x("Yes")
| 8 |
statement
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x,y=map(int,input().split())
z=x&(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
z=x&(y-1)
| 2 |
operation
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2<0:
print("Yes")
else:
print("No")
|
if z%2<0:
| 12 |
decision
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2<0:
print("Yes")
else:
print("No")
|
if z%2<0:
| 12 |
decision
|
x,y=map(int,input().split())
z=x-(y-1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
x,y=map(int,input().split())
z=x-(y//1)
if z<0 or y==0:
print("No")
else:
if y==1:
if x==0:
print("Yes")
else:
print("No")
else:
if z%2==0:
print("Yes")
else:
print("No")
|
z=x-(y//1)
| 2 |
operation
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 0
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2 < sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 125
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2 < sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
i2 = 125
| 5 |
value
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 0
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2 < sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 0
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if z == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2 < sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
if z == n:
| 15 |
statement
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 0
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2 < sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
n,m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
i1 = 0
i2 = 0
sum1 = x[0]
sum2 = y[0]
count = 0
while i1 != n and i2 != m:
while sum1 < sum2:
i1 += 1
if i1 == n:
break
sum1 += x[i1]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i1 += 1
if i1 == n:
break
sum1 += x[i1]
while sum2>sum1:
i2 += 1
if i2 == m:
break
sum2 += y[i2]
if i1 == n:
break
if (sum1 == sum2):
count += 1
i2 += 1
if i2 == m:
break
sum2 += y[i2]
print(count)
|
while sum2>sum1:
| 23 |
decision
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
n = int(input())
a = [int(i) for i in z().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
a = [int(i) for i in z().split()]
| 2 |
statement
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.z(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
c.z(i)
| 9 |
statement
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 89:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
if i >= 89:
| 6 |
value
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)&sum(c))
|
print(sum(b)&sum(c))
| 13 |
operation
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)-sum(c))
|
n = int(input())
a = [int(i) for i in input().split()]
b =[]
c = []
for i in a:
if i >= 0:
b.append(i)
else:
c.append(i)
if c == []:
print(sum(b))
else:
print(sum(b)>>sum(c))
|
print(sum(b)>>sum(c))
| 13 |
operation
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 0
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[0] - a[1] + i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 11
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[0] - a[1] + i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
s = 11
| 5 |
value
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 0
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[0] - a[1] + i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 0
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[21] - a[1] + i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
c.pop(a[21] - a[1] + i)
| 15 |
value
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 0
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[0] - a[1] + i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
a = input().split()
a = [int(a[i]) for i in range(2)]
s = 0
b = a[0] - a[1]
c = []
for i in range(a[0]):
c.append(i + 1)
c = c[::-1]
for i in range(b)[::-1]:
c.pop(a[0] - a[1]*i)
for i in range(len(c)):
s = s^c[i]
print(s)
|
c.pop(a[0] - a[1]*i)
| 15 |
operation
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr%1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
temp=1<<(itr%1)
| 9 |
operation
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n==0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
while n==0:
| 4 |
decision
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
z+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
z+=1
| 5 |
statement
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1^(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
temp=1^(itr-1)
| 9 |
operation
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for i in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
n,k=map(int,input().split())
def setBitNumber(n):
i=0
while n>0:
i+=1
n=n>>1
return i
itr=setBitNumber(n)
temp=1<<(itr-1)
ans=temp
for y in range(1,min(k,itr)):
ans+=temp>>i
print(ans)
|
for y in range(1,min(k,itr)):
| 11 |
statement
|
a=input()
a=int(a)
c=0
i=0
k=1
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10==0:
i=i+1
m=k
k=k+1
print(m)
|
a=input()
a=int(a)
c=0
i=0
k=1
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10<0:
i=i+1
m=k
k=k+1
print(m)
|
if c%10<0:
| 12 |
decision
|
a=input()
a=int(a)
c=0
i=0
k=1
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10==0:
i=i+1
m=k
k=k+1
print(m)
|
a=input()
a=int(a)
c=0
i=0
k=49
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10==0:
i=i+1
m=k
k=k+1
print(m)
|
k=49
| 5 |
value
|
a=input()
a=int(a)
c=0
i=0
k=1
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10==0:
i=i+1
m=k
k=k+1
print(m)
|
a=input()
a=int(a)
c=91
i=0
k=1
while i!=a:
z=k
c=0
while z!=0:
c=c+z%10
z=z//10
if c%10==0:
i=i+1
m=k
k=k+1
print(m)
|
c=91
| 3 |
value
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
y = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
y = l[f1 - 1]
| 7 |
statement
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1>>1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
f2 = l[f1>>1]
| 7 |
operation
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i>>1]
f2 = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
f1 = l[i>>1]
| 6 |
operation
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1 - 1]
if i == f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
n = input()
l = list(map(lambda x: int(x), input().split(' ')))
triangle = False
for i in l:
f1 = l[i - 1]
f2 = l[f1 - 1]
if i<f2:
triangle = True
break
if triangle:
print("YES")
else:
print("NO")
|
if i<f2:
| 8 |
decision
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.