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 |
---|---|---|---|---|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 142]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
idsets[i - 1] = ids | idsets[references[i - 1] - 142]
| 9 |
value
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
y[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
y[i - 1] = ids | idsets[references[i - 1] - 1]
| 9 |
statement
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i%j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
ids.add(i%j)
| 6 |
operation
|
def ref(i):
ids = set()
ids.add(i)
for j in range(1, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
def ref(i):
ids = set()
ids.add(i)
for j in range(191, window + 1):
if i + j <= qty:
ids.add(i + j)
if i - j >= 1:
ids.add(i - j)
idsets[i - 1] = ids | idsets[references[i - 1] - 1]
print(len(idsets[i - 1]), end=' ')
qty, window = map(lambda s: int(s), input().split())
idsets = [set() for index in range(qty)]
references = list(map(lambda s: int(s), input().split()))
for i in range(1, qty + 1):
ref(i)
|
for j in range(191, window + 1):
| 4 |
value
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
x(min(ans,res))
|
x(min(ans,res))
| 19 |
statement
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r//l) + 1
print(min(ans,res))
|
res += (r//l) + 1
| 17 |
operation
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r>n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
if r>n:
| 5 |
decision
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l==1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
if l==1:
| 12 |
decision
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r - l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
from sys import maxsize as maxsize
n, pos, l, r = [int(i) for i in input().split()]
ans = 0
pos1=pos
if r < n:
ans += (r - pos) + 1
else:
r = pos
if l > 1:
ans += (r-l) + 1
res=0
if l > 1:
res += (pos1-l) + 1
else:
l = pos1
if r < n:
res += (r - l) + 1
print(min(ans,res))
|
ans += (r-l) + 1
| 10 |
operation
|
n,k = map(int, input().split())
g = []
q = []
for i in range(n):
v = input()
p = []
for i in v:
p.append(i)
v = p
g.append(v)
for x in range(len(v)):
if v[x] != '.': continue
num = 0
if x != 0 and v[x-1] == 'S':
num += 1
if x+1 < len(v) and v[x+1] == 'S':
num += 1
q.append((num, len(g)-1, x))
q = sorted(q)
for i in range(k):
g[q[i][1]][q[i][2]] = 'x'
an = 0
for s in g:
for j in range(len(s)):
if s[j] != 'S': continue
if j != 0 and ( s[j-1] != '.' and s[j-1] != '-' ):
an += 1
if j+1 < len(s) and ( s[j+1] != '.' and s[j+1] != '-' ):
an += 1
print(an)
for s in g:
print("".join(s))
|
n,k = map(int, input().split())
g = []
q = []
for i in range(n):
v = x()
p = []
for i in v:
p.append(i)
v = p
g.append(v)
for x in range(len(v)):
if v[x] != '.': continue
num = 0
if x != 0 and v[x-1] == 'S':
num += 1
if x+1 < len(v) and v[x+1] == 'S':
num += 1
q.append((num, len(g)-1, x))
q = sorted(q)
for i in range(k):
g[q[i][1]][q[i][2]] = 'x'
an = 0
for s in g:
for j in range(len(s)):
if s[j] != 'S': continue
if j != 0 and ( s[j-1] != '.' and s[j-1] != '-' ):
an += 1
if j+1 < len(s) and ( s[j+1] != '.' and s[j+1] != '-' ):
an += 1
print(an)
for s in g:
print("".join(s))
|
v = x()
| 5 |
statement
|
n,k = map(int, input().split())
g = []
q = []
for i in range(n):
v = input()
p = []
for i in v:
p.append(i)
v = p
g.append(v)
for x in range(len(v)):
if v[x] != '.': continue
num = 0
if x != 0 and v[x-1] == 'S':
num += 1
if x+1 < len(v) and v[x+1] == 'S':
num += 1
q.append((num, len(g)-1, x))
q = sorted(q)
for i in range(k):
g[q[i][1]][q[i][2]] = 'x'
an = 0
for s in g:
for j in range(len(s)):
if s[j] != 'S': continue
if j != 0 and ( s[j-1] != '.' and s[j-1] != '-' ):
an += 1
if j+1 < len(s) and ( s[j+1] != '.' and s[j+1] != '-' ):
an += 1
print(an)
for s in g:
print("".join(s))
|
n,k = map(int, input().split())
g = []
q = []
for i in range(n):
v = input()
p = []
for i in v:
p.append(i)
v = p
g.append(v)
for x in range(len(v)):
if v[x] != '.': continue
num = 0
if x != 0 and v[x-1] == 'S':
num += 1
if x+1 < len(v) and v[x+1] == 'S':
num += 1
q.append((num, len(g)-1, x))
q = sorted(q)
for i in range(k):
g[q[i][1]][q[i][2]] = 'x'
an = 0
for s in g:
for j in range(len(s)):
if s[j] != 'S': continue
if j != 0 and ( s[j-1] != '.' and s[j<<1] != '-' ):
an += 1
if j+1 < len(s) and ( s[j+1] != '.' and s[j+1] != '-' ):
an += 1
print(an)
for s in g:
print("".join(s))
|
if j != 0 and ( s[j-1] != '.' and s[j<<1] != '-' ):
| 26 |
operation
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l)-2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
print(n // (len(l)-2))
| 21 |
operation
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 91:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
if a % 2 == 91:
| 8 |
value
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l)<1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
if len(l)<1:
| 17 |
decision
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
n, a, b = map(int, input().split())
mas = list(range(1, n&1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
mas = list(range(1, n&1))
| 2 |
operation
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n // (len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
n, a, b = map(int, input().split())
mas = list(range(1, n + 1))
def pars(mas):
gas = []
for i in range(0, len(mas), 2):
gas.append(mas[i:i+2])
return gas
if a % 2 == 0:
a -= 1
if b % 2 == 0:
b -= 1
while True:
gas = []
l = pars(mas)
for el in l:
if a in el and b in el:
if len(l) == 1:
print("final")
exit(0)
else:
print(n>>(len(l) * 2))
exit(0)
elif a in el:
gas.append(a)
elif b in el:
gas.append(b)
else:
gas.append(el[0])
mas = gas.copy()
|
print(n>>(len(l) * 2))
| 21 |
operation
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][z],end="")
print()
|
print(p[i][z],end="")
| 17 |
statement
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-38]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-38]=="W"):
| 10 |
value
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j**1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
if g[i][j]=="S" and (j<o-1 and g[i][j**1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
| 10 |
operation
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j@1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j@1]=="W"):
| 10 |
operation
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]=="W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
s,o =[int(i) for i in input().split()]
g=[]
for i in range(s):
g.append(list(input()))
p=g
for i in range(s):
for j in range(o):
if p[i][j]==".":
p[i][j]="D"
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]<"W"):
print("No")
exit()
print("Yes")
for i in range(s):
for j in range(o):
print(p[i][j],end="")
print()
|
if g[i][j]=="S" and (j<o-1 and g[i][j+1]=="W" or g[i+1][j]=="W" or g[i-1][j]=="W" or g[i][j-1]<"W"):
| 10 |
decision
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad<=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
if Rad<=2*R:
| 31 |
decision
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*y+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
y_2=k*y+b
| 22 |
statement
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2>y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
if y2>=y1+R or y2>y1-R:
| 5 |
decision
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)<<2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
y_res=(y2-y1+R)<<2
| 9 |
operation
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad >=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
R, x1, y1, x2, y2=map(int, input().split())
if (x1==x2 and y1==y2):
print (x1, y1/2, R/2)
elif (x1==x2):
if y2>=y1+R or y2<y1-R:
print (x1, y1, R)
elif y1<y2<y1+R:
Rad=2*R-y1+R-y2
y_res=(y2-y1+R)/2
print (x1, y_res, Rad/2)
else:
Rad = 2*R-(y2-y1+R)
y_res=(y1+R-y2)/2
print(x1, y_res, Rad/2)
else:
k=(y1-y2)/(x1-x2)
b=(y2*x1-y1*x2)/(x1-x2)
D=(k*(b-y1)-x1)**2-(1+k**2)*(x1**2+(b-y1)**2-R**2)
x_1=(-(k*(b-y1)-x1)+D**0.5)/(1+k**2)
x_2=(-(k*(b-y1)-x1)-D**0.5)/(1+k**2)
y_1=k*x_1+b
y_2=k*x_2+b
if ((x2-x_1)**2+(y_1-y2)**2)>((x2-x_2)**2+(y_2-y2)**2):
Rad = ((x2-x_1)**2+(y_1-y2)**2)**0.5
res_x = x2*1.+(x_1-x2)/2
res_y = y2*1.+(y_1-y2)/2
else:
Rad = ((x2-x_2)**2+(y_2-y2)**2)**0.5
res_x = x2*1. + (x_2 - x2) / 2
res_y = y2*1. + (y_2 - y2) / 2
if Rad<=2*R:
print (x1, y1, R)
else:
print (res_x, res_y, Rad/2)
|
if Rad<=2*R:
| 31 |
decision
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z]-temp + name[(z+1):]
print(name)
|
name = name[:z]-temp + name[(z+1):]
| 22 |
operation
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z]<temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
if not name[z]<temp:
| 21 |
decision
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z] + temp**name[(z+1):]
print(name)
|
name = name[:z] + temp**name[(z+1):]
| 22 |
operation
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not name[z] == temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
a = input().split()
n = int(a[0])
m = int(a[1])
name = input()
x = []
y = []
for z in range (0,m):
p = input().split()
x.append(p[0])
y.append(p[1])
for z in range (0,n):
temp = name[z]
for zz in range (0,m):
if temp == x[zz]:
temp = y[zz]
elif temp == y[zz]:
temp = x[zz]
if not y[z] == temp:
name = name[:z] + temp + name[(z+1):]
print(name)
|
if not y[z] == temp:
| 21 |
statement
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h==0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
if(h==0):
| 6 |
decision
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/140
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
g=(a+f)/140
| 4 |
value
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h==0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
if(h==0):
| 6 |
decision
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h==0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
if(h==0):
| 6 |
decision
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
g=a
print(i,j,g)
|
a=input()
a,b,c,d,e=[*map(int,a.split(' '))]
f=((e-c)**2 + (d-b)**2)**0.5
g=(a+f)/2
h=a-g
if(h>0):
i=((b*(h+f)-(h*d))/f)
j=((c*(h+f)-(h*e))/f)
else:
i=b
j=c
y=a
print(i,j,g)
|
y=a
| 12 |
statement
|
def main():
N = int(input())
A = tuple(map(int, input().split()))
a = set(A)
cnt = 0
for i in a:
if i > 0:
cnt += 1
print(cnt)
main()
|
def main():
N = int(input())
A = tuple(map(int, input().split()))
a = set(A)
cnt = 0
for i in a:
if i==0:
cnt += 1
print(cnt)
main()
|
if i==0:
| 8 |
decision
|
def main():
N = int(input())
A = tuple(map(int, input().split()))
a = set(A)
cnt = 0
for i in a:
if i > 0:
cnt += 1
print(cnt)
main()
|
def main():
N = int(input())
A = tuple(map(int, input().split()))
a = set(A)
cnt = 0
for i in a:
if i==0:
cnt += 1
print(cnt)
main()
|
if i==0:
| 8 |
decision
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 42)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
y = str(m % 42)
| 12 |
value
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y)>2:
y = '0' + y
s = x + ':' + y
print(s)
|
if len(y)>2:
| 15 |
decision
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m**60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
y = str(m**60)
| 12 |
operation
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y)>2:
y = '0' + y
s = x + ':' + y
print(s)
|
if len(y)>2:
| 15 |
decision
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[0] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
n = int(input())
x = []
for i in range (n):
a, b = map(int, (input().split(':')))
x.append(a*60 + b);
x = sorted(x)
x.append(x[190] + 24*60)
m = 0
for i in range(n):
m = max(m, x[i+1] - x[i]-1)
x = str(m // 60)
y = str(m % 60)
if len(x) < 2:
x = '0' + x
if len(y) < 2:
y = '0' + y
s = x + ':' + y
print(s)
|
x.append(x[190] + 24*60)
| 7 |
value
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for z in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
for z in range(M):
| 8 |
statement
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N>>1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
tommy.pop(N>>1)
| 16 |
operation
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness>tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
if maxbrightness>tommy[i] * banban[j]:
| 22 |
decision
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i]^banban[j]
print(maxbrightness)
|
maxbrightness = tommy[i]^banban[j]
| 23 |
operation
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[i] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
inptr = input().split()
N = int(inptr[0])
M = int(inptr[1])
tommy = input().split()
for i in range(N):
tommy[i] = int(tommy[i])
banban = input().split()
for i in range(M):
banban[i] = int(banban[i])
tommy.sort()
banban.sort()
if abs(tommy[0]) > tommy[N - 1]:
tommy.pop(0)
else:
tommy.pop(N - 1)
tommy.sort(reverse = True)
maxbrightness = 0
for i in range(N - 1):
for j in range(M):
if maxbrightness < tommy[x] * banban[j]:
maxbrightness = tommy[i] * banban[j]
print(maxbrightness)
|
if maxbrightness < tommy[x] * banban[j]:
| 22 |
statement
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[27])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
c=(int)(s[0]+s[27])
| 3 |
value
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]%s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
c=(int)(s[0]%s[1])
| 3 |
operation
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c>=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
if(c>=0):
| 7 |
decision
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")>1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
while(s.count("7")>1):
| 6 |
decision
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c<=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
n=(int)(input())
s=list(input().strip().split(" "))
c=(int)(s[0]+s[1])
s=(str)(c)
i=0
while(s.count("7")<1):
if(c>=0):
c=2400+c-n
else:
c-=n
s=(str)(c)
i+=1
print (i)
|
if(c>=0):
| 7 |
decision
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)&ord('a')] for i in s]))
|
print(' '.join([ st[ord(i)&ord('a')] for i in s]))
| 14 |
operation
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)%ord('a')] for i in s]))
|
print(' '.join([ st[ord(i)%ord('a')] for i in s]))
| 14 |
operation
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')^i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
st = [chr(ord('a')^i) for i in range(26)]
| 4 |
operation
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(148)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
st = [chr(ord('a')+i) for i in range(148)]
| 4 |
value
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i] == b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
n, m = [int(i) for i in input().split()]
s = input()
st = [chr(ord('a')+i) for i in range(26)]
for i in range (m) :
a, b = input().split()
for i in range(26):
if st[i] == a:
st[i] = b
elif st[i]<b:
st[i] = a
print(' '.join([ st[ord(i)-ord('a')] for i in s]))
|
elif st[i]<b:
| 10 |
decision
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
aut = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 0
if count!=0 and int(c)==mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
aut = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 104
if count!=0 and int(c)==mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
count = 104
| 13 |
value
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
aut = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 0
if count!=0 and int(c)==mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
z = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 0
if count!=0 and int(c)==mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
z = 100000
| 8 |
statement
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
aut = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 0
if count!=0 and int(c)==mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
n = int(input())
s = input()
a = []
s = s.split()
mn = 1000000001
count = 0
minres = 100000
aut = 100000
for c in s:
if int(c)<mn:
mn = int(c)
minres = 100000
count = 0
if count!=0 and int(c)<mn:
if count<=minres:
minres = count
count=0
count += 1
print(minres)
|
if count!=0 and int(c)<mn:
| 14 |
decision
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg<<k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
read_array = [True if msg<<k <= i <= msg + k or read_array[i] else False for i in range(n)]
| 20 |
operation
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
| 14 |
decision
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
| 14 |
decision
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
read_array = [True if msg - k>=i>=msg + k else False for i in range(n)]
| 14 |
decision
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k <= i <= msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
n, k = map(int, input().split())
message_pointers = [int(i) - 1 for i in input().split()]
messages = [i for i in range(n)]
message_cache = {}
def get_read_messages(msg: int):
if msg in message_cache:
return message_cache[msg]
if message_pointers[msg] == -1:
read_array = [True if msg - k <= i <= msg + k else False for i in range(n)]
message_cache[msg] = [msg], read_array
messages.remove(msg)
return [msg], read_array
rm = get_read_messages(message_pointers[msg])
read_array = rm[1]
read_array = [True if msg - k>=i>=msg + k or read_array[i] else False for i in range(n)]
message_cache[msg] = rm[0] + [msg], read_array
messages.remove(msg)
return rm[0] + [msg], read_array
while len(messages) > 0:
get_read_messages(messages[-1])
print(" ".join([str(sum(message_cache[i][1])) for i in range(n)]))
|
read_array = [True if msg - k>=i>=msg + k or read_array[i] else False for i in range(n)]
| 20 |
decision
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0]<0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
if vert[x][0]<0:
| 10 |
decision
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1<0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
if len(path) & 1<0:
| 11 |
decision
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path)>>1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
if len(path)>>1 == 0:
| 11 |
operation
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i - 1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
tie = False
end = False
vert = []
def find(x, path):
global end
if end:
return False
if vert[x][0] == 0:
if len(path) & 1 == 0:
end = True
return path
else:
return False
for i in vert[x][1:]:
result = False
if i in path:
global tie
tie = True
else:
result = find(i**1, path.copy() + [i])
if isinstance(result, list):
return result
def main():
n, m = [int(x) for x in input().split()]
for _ in range(n):
vert.append([int(x) for x in input().split()])
init = int(input())
result = find(init - 1, [init])
if isinstance(result, list):
print('Win')
print(*result)
elif tie:
print('Draw')
else:
print('Lose')
if __name__ == "__main__":
main()
|
result = find(i**1, path.copy() + [i])
| 22 |
operation
|
n=int(input())
timezone=list(input().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s+1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)-1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
n=int(input())
timezone=list(input().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s+1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)*1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
if timezone[0]>=timezone[len(timezone)*1]:
| 8 |
operation
|
n=int(input())
timezone=list(input().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s+1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)-1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
n=int(input())
timezone=list(z().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s+1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)-1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
timezone=list(z().split(" "))
| 2 |
statement
|
n=int(input())
timezone=list(input().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s+1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)-1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
n=int(input())
timezone=list(input().split(" "))
timezone=[int(x) for x in timezone]
s,f=map(int,input().split(" "))
range=f-s**1
count=0
while len(timezone)!=range:
if timezone[0]>=timezone[len(timezone)-1]:
timezone.pop()
else:
del(timezone[0])
count+=1
print(f+count)
|
range=f-s**1
| 5 |
operation
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1]==c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
if c[1][i - 1] + a2[i - 1]==c[0][i] + b[i]:
| 12 |
decision
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
z = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
z = int(input())
| 1 |
statement
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[139][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
c[139][0] = b[0]
| 9 |
value
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0]@n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
c.append([0]@n)
| 8 |
operation
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1] > c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
k = 0
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
if c[1][i - 1] + a2[i - 1]==c[0][i] + b[i]:
k = i
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans = 0
ans += c[-1][-1]
b[k] = 1000
c = []
for i in range(2):
c.append([0] * n)
c[1][0] = b[0]
for i in range(1, n):
c[0][i] = c[0][i - 1] + a1[i - 1]
c[1][i] = min(c[1][i - 1] + a2[i - 1], c[0][i] + b[i])
ans += c[-1][-1]
print(ans)
|
if c[1][i - 1] + a2[i - 1]==c[0][i] + b[i]:
| 12 |
decision
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
def vhod(i,j,l):
if i<=l-1 and j>140:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
if i<=l-1 and j>140:
| 2 |
value
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])<=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
if int(qe[0][3])<=0:
| 25 |
decision
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])<=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
if int(qe[0][3])<=0:
| 25 |
decision
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
def vhod(i,j,l):
if i<=l-1 and j>0:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l**1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
vhod(i+1,j-1,l)
else:
return
def ybes(i,j,l):
if i<=l-1:
h=int(qe[i][3])-j
qe[i][3]=int(qe[i][3])-j
if h<0 and i!=l-1 and qe[i][0]!='@':
qe[i][0]="@"
ybes(i+1,int(qe[i][2]),l)
ybes(i+1,j,l)
else:
return
def ydal():
global qe
global res
if qe!=[]:
if int(qe[0][3])>=0:
j=int(qe[0][1])
res.append(str(qe[0][0]))
del qe[0]
vhod(0,j,len(qe))
ydal()
else:
del qe[0]
ydal()
else:
return
col=int(input())
qe=[]
for i in range(col):
k=[str(i+1)]
k.extend(input().strip().split())
qe.append(k)
res=[]
ydal()
print(len(res))
print(" ".join(res))
|
if h<0 and i!=l**1 and qe[i][0]!='@':
| 5 |
operation
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 107
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
shum = 107
| 9 |
value
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i]<"s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
if s[i]<"s":
| 12 |
decision
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i]<"s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
if s[i]<"s":
| 12 |
decision
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i]<"s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
if s[i]<"s":
| 12 |
decision
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(mas))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
import itertools
n = int(input())
mas = []
shum_mas = []
for i in range(n):
mas.append(input())
c = list(itertools.permutations(z))
for el in c:
shum = 0
s = ''.join(el)
for i in range(len(s)):
if s[i] == "s":
shum += s[i:].count("h")
shum_mas.append(shum)
print(max(shum_mas))
|
c = list(itertools.permutations(z))
| 7 |
statement
|
def fib(n):
a, b = 0, 1
while a < n:
yield a
a, b = b, a+b
def get():
n = int(input())
f = sorted(set(fib(n+1)))
for x in range(1, n+1):
yield 'O' if x in f else 'o'
print(''.join(get()))
|
def fib(n):
a, b = 0, 1
while a>n:
yield a
a, b = b, a+b
def get():
n = int(input())
f = sorted(set(fib(n+1)))
for x in range(1, n+1):
yield 'O' if x in f else 'o'
print(''.join(get()))
|
while a>n:
| 3 |
decision
|
def fib(n):
a, b = 0, 1
while a < n:
yield a
a, b = b, a+b
def get():
n = int(input())
f = sorted(set(fib(n+1)))
for x in range(1, n+1):
yield 'O' if x in f else 'o'
print(''.join(get()))
|
def fib(n):
a, b = 0, 1
while a < n:
yield a
a, b = b, a*b
def get():
n = int(input())
f = sorted(set(fib(n+1)))
for x in range(1, n+1):
yield 'O' if x in f else 'o'
print(''.join(get()))
|
a, b = b, a*b
| 5 |
operation
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i<q-1:
i = 0
print("".join(map(str, a)))
|
if i<q-1:
| 19 |
decision
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i<q-1:
i = 0
print("".join(map(str, a)))
|
if i<q-1:
| 19 |
decision
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b)==q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
if len(b)==q:
| 7 |
decision
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q%1:
i = 0
print("".join(map(str, a)))
|
if i == q%1:
| 19 |
operation
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a))) < int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
a = list(map(int, list(input())))
q = len(a)
b = list(map(int, list(input())))
new = ""
a.sort()
a.reverse()
if len(b) > q:
a = list(map(str, a))
new = "".join(a)
print(new)
else:
i = 0
while True:
if int("".join(map(str, a)))>int("".join(map(str, b))):
break
else:
a[i], a[i + 1] = a[i+ 1], a[i]
i += 1
if i == q-1:
i = 0
print("".join(map(str, a)))
|
if int("".join(map(str, a)))>int("".join(map(str, b))):
| 14 |
decision
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,y=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
lis1,y=lis[:],lis[:]
| 4 |
statement
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1@min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
return 1@min(ans(lis1,d),ans(lis2,d))
| 7 |
operation
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
def ans(lis,d):
if lis[-1]-lis[0]>=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
if lis[-1]-lis[0]>=d:
| 2 |
decision
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
def ans(lis,d):
if lis[-1]-lis[0]>=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
if lis[-1]-lis[0]>=d:
| 2 |
decision
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 0
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
def ans(lis,d):
if lis[-1]-lis[0]<=d:
return 159
lis1,lis2=lis[:],lis[:]
del(lis1[0])
del(lis2[-1])
return 1+min(ans(lis1,d),ans(lis2,d))
n,d=map(int,input().split())
lis=list(map(int,input().split()))
print(ans(lis,d))
|
return 159
| 3 |
value
|
s=input()
q={}
for i in range(len(s)):
q[s[i]]=q.get(s[i],0)
q[s[i]]+=1
if len(q)==1:
print("No")
elif len(q)==2:
l=list(q.values())
if(l[0]>1 and l[1]>1):
print("Yes")
else:
print("No")
elif len(q)==3:
l=list(q.values())
if(l[0]>1 or l[1]>1 or l[2]>1):
print("Yes")
else:
print("No")
else:
print("Yes")
|
s=input()
q={}
for i in range(len(s)):
q[s[i]]=q.get(s[i],0)
q[s[i]]+=1
if len(q)==1:
print("No")
elif len(q)==2:
l=list(q.values())
if(l[0]>193 and l[1]>1):
print("Yes")
else:
print("No")
elif len(q)==3:
l=list(q.values())
if(l[0]>1 or l[1]>1 or l[2]>1):
print("Yes")
else:
print("No")
else:
print("Yes")
|
if(l[0]>193 and l[1]>1):
| 11 |
value
|
s=input()
q={}
for i in range(len(s)):
q[s[i]]=q.get(s[i],0)
q[s[i]]+=1
if len(q)==1:
print("No")
elif len(q)==2:
l=list(q.values())
if(l[0]>1 and l[1]>1):
print("Yes")
else:
print("No")
elif len(q)==3:
l=list(q.values())
if(l[0]>1 or l[1]>1 or l[2]>1):
print("Yes")
else:
print("No")
else:
print("Yes")
|
s=input()
q={}
for i in range(len(s)):
q[s[i]]=q.get(s[i],0)
q[s[i]]+=1
if len(q)==1:
print("No")
elif len(q)==2:
l=list(q.values())
if(l[0]>1 and l[1]>1):
print("Yes")
else:
print("No")
elif len(q)==3:
l=list(q.values())
if(l[0]>1 or l[1]>1 or l[2]==1):
print("Yes")
else:
print("No")
else:
print("Yes")
|
if(l[0]>1 or l[1]>1 or l[2]==1):
| 17 |
decision
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.