original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])<-1):
print ("Yes")
else:
print("No")
|
if (int(s[0])%2==0 and int (s[1])<-1):
| 12 |
decision
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])>0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
if (int(s[0])>0):
| 8 |
decision
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])&(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
s[0] = int(s[0])&(int(s[1]))
| 7 |
operation
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])<0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
import sys
s = sys.stdin.readline().strip().split(' ')
if (int(s[1])>0):
s[1] = int(s[1])-1
s[0] = int(s[0])-(int(s[1]))
if (int(s[0])>0):
s[0] = -3
s[1] = -1
if (int(s[0])%2==0 and int (s[1])==-1):
print ("Yes")
else:
print("No")
|
if (int(s[0])>0):
| 8 |
decision
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g<b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
if g<b and c!=e:
| 20 |
decision
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b**1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
c = a[b**1]
| 15 |
operation
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
n = int(input())
a = list (map(int, input().split()))
flag = 13
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
flag = 13
| 3 |
value
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g<b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
if g<b and c!=e:
| 20 |
decision
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i+1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
n = int(input())
a = list (map(int, input().split()))
flag = 0
for i in range(n):
if flag == 1:
break
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0
for k in range(1):
b = i//1
c = a[b-1]
d = c-1
e = a[d]
f = e-1
g = a[f]
if g == b and c!=e:
flag = 1
print('YES')
if flag != 1:
print('NO')
|
b = i//1
| 14 |
operation
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i//1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
elif k[i] == "U" and k[i//1] == "R":
| 16 |
operation
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i]<"U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
elif k[i]<"U" and k[i + 1] == "R":
| 16 |
decision
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i]<"U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
elif k[i]<"U" and k[i + 1] == "R":
| 16 |
decision
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i@1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
if k[i] == "R" and k[i@1] == "U":
| 12 |
operation
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n - 1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
n = int(input())
k = str(input())
j = ""
lastWasDone = False
for i in range(0, n):
if lastWasDone:
lastWasDone = False
else:
if i != n&1:
if k[i] == "R" and k[i + 1] == "U":
j += "D"
lastWasDone = True
elif k[i] == "U" and k[i + 1] == "R":
j += "D"
lastWasDone = True
else:
j += k[i]
else:
j += k[i]
print(len(j))
|
if i != n&1:
| 11 |
operation
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = x
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
flag = x
| 14 |
statement
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
def isLucky(num):
while num > 1 :
if num%10<7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
if num%10<7:
| 3 |
decision
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or y(mm) is True:
flag = True
count += 1
print(count)
|
if isLucky(hh) or y(mm) is True:
| 22 |
statement
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60 + mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
def isLucky(num):
while num > 1 :
if num%10==7:
return True
num = num//10
return False
x = int(input())
hh, mm = map(int, input().split())
if isLucky(hh) or isLucky(mm) is True:
print(0)
else:
count = 0
flag = False
while flag is False:
mm = mm-x
if mm < 0:
mm = 60^mm
hh = hh - 1
if hh < 0:
hh = 23
if isLucky(hh) or isLucky(mm) is True:
flag = True
count += 1
print(count)
|
mm = 60^mm
| 18 |
operation
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][127])
|
print(key + ' ' + res[key][127])
| 36 |
value
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n+1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
for _ in range(n+1):
| 16 |
operation
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
def deeper(x, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
def deeper(x, c):
| 1 |
statement
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c + 1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
def deeper(namever, c):
for project in projects[namever]:
if project.split()[0] != start.split()[0]:
dependencies.append(project.split() + [c])
deeper(project, c-1)
n = int(input())
projects = dict()
dependencies = []
start = input()
projects[start] = [input() for _ in range(int(input()))]
input()
for _ in range(n - 1):
namever = input()
projects[namever] = [input() for _ in range(int(input()))]
input()
deeper(start, 1)
res = dict()
for project in dependencies:
if project[0] in res.keys():
if project[2] < res[project[0]][1]:
res[project[0]] = (project[1], project[2])
elif project[2] == res[project[0]][1] and int(project[1]) > int(res[project[0]][0]):
res[project[0]] = res[project[0]] = (project[1], project[2])
else:
res[project[0]] = (project[1], project[2])
print(len(res))
for key in sorted(res.keys()):
print(key + ' ' + res[key][0])
|
deeper(project, c-1)
| 5 |
operation
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i%diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
optimal = i%diff
| 22 |
operation
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n//i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
offset = min(diff, n//i)
| 18 |
operation
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 14
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
optimal = 14
| 15 |
value
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end>>optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
optimal = (end>>optimal) % n
| 27 |
operation
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal == 0:
optimal = n
print(optimal)
|
n = int(input())
inp = input().split(" ")
people = []
for i in range(n):
people.append(int(inp[i]))
inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start
m = 0
optimal = 0
people = people + people
for i in range(n):
offset = min(diff, n - i)
total = sum(people[i: i + diff])
if total > m:
m = total
optimal = i + diff
if m == 0:
optimal = 1
else:
optimal = (end - optimal) % n
if optimal<0:
optimal = n
print(optimal)
|
if optimal<0:
| 28 |
decision
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)<<1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
for i in range(1,sum(x)<<1):
| 9 |
operation
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)>>1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
for i in range(1,sum(x)>>1):
| 9 |
operation
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
y+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
y+=1
| 17 |
statement
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in z().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in z().split()]
| 1 |
statement
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)+1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]
z=[int(i) for i in input().split()]
a=1
t=1
c=0
b=0
f=0
for i in range(1,sum(x)*1):
if t>x[0] or a>x[1]:
break
if sum(y[c:t])==sum(z[b:a]):
f+=1
c=t
b=a
a+=1
t+=1
elif sum(y[c:t])>sum(z[b:a]):
a+=1
else:
t+=1
if len(y)==1 or len(z)==1:
f=1
break
print(f)
|
for i in range(1,sum(x)*1):
| 9 |
operation
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t<=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
if t<=0:
| 7 |
decision
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t<=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
if t<=0:
| 7 |
decision
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in x:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
for t in x:
| 6 |
statement
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(c)
print(s)
|
b = []
c = []
n = int(input().strip())
A = list(map(int, input().split(' ')))
for t in A:
if t>=0:
if not (t in b):
b.append(t)
else:
c.append(t)
else:
if not (t in c):
c.append(t)
else:
b.append(t)
s = sum(b) - sum(x)
print(s)
|
s = sum(b) - sum(x)
| 18 |
statement
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re<0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
if (re<0):
| 7 |
decision
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re|r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
x3 = x2 + ((re|r)/2);
| 8 |
operation
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
x3 = x
| 5 |
statement
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/108);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
x3 = x2 + ((re+r)/108);
| 8 |
value
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)**2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
r,x1,y1,x2,y2=map(int ,input().split())
re = ((x1-x2)%2+(y1-y2)**2)**0.5
if (re>=r):
re = r
x3 = x1
y3 = y1
if (re==0):
x3 = x2 + ((re+r)/2);
y3 = y2 ;
re = ((re+r)/2);
else:
x3 = x2 + ((((re+r)/2)/re) * (x1-x2));
y3 = y2 + ((((re+r)/2)/re) * (y1-y2));
re = ((re+r)/2);
print(x3,y3,re)
|
re = ((x1-x2)%2+(y1-y2)**2)**0.5
| 2 |
operation
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]<<b[i]))
c.sort()
print(c[-1])
|
c.append(max(c[j],a[j]<<b[i]))
| 10 |
operation
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[153])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
c.append(a[0]*b[153])
| 7 |
value
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-10])
|
print(c[-10])
| 14 |
value
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[0]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a.sort()
b.sort()
c=[]
c.append(a[135]*b[0])
for i in range(m):
for j in range(n-1):
c.append(max(c[j],a[j]*b[i]))
c.sort()
print(c[-1])
|
c.append(a[135]*b[0])
| 7 |
value
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p]<str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
elif(str[0:p]<str[p:]):
| 6 |
decision
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)>=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
if(len(str)>=3):
| 4 |
decision
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-14]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
str = str[:-14]
| 15 |
value
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)>=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
if(len(str)>=3):
| 4 |
decision
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count+1;
str = str[:-1]
fun(str)
print(count)
|
def fun(str):
global count
p = int(len(str)/2)
if(len(str)<=3):
count = count +len(str)
elif(str[0:p] == str[p:]):
count = count+1
str = str[0:p]
if(len(str)%2 != 0):
count = count +1
str = str[:-1]
fun(str)
else:
count += 2
str = str[:-2]
fun(str)
n = int(input())
str = input()
count = 0
if(len(str)%2 == 0):
fun(str)
print(count)
else:
count = count//1;
str = str[:-1]
fun(str)
print(count)
|
count = count//1;
| 26 |
operation
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat)@meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
answer += sum(needMeat)@meatPrice[i]
| 19 |
operation
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j]|minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
answer += needMeat[j]|minPrice
| 25 |
operation
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i]<minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
if meatPrice[i]<minPrice:
| 23 |
decision
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i]<minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
if meatPrice[i]<minPrice:
| 18 |
decision
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i] == minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
__author__ = 'cmashinho'
n = int(input())
needMeat = []
meatPrice = []
for _ in range(n):
a, b = map(int, input().split())
needMeat.append(a)
meatPrice.append(b)
answer = 0
minPrice = min(meatPrice)
for i in range(n):
if i == 0:
if meatPrice[i]<minPrice:
answer += sum(needMeat) * meatPrice[i]
break
answer += needMeat[i] * meatPrice[i]
else:
if meatPrice[i] == minPrice:
for j in range(i, n):
answer += needMeat[j] * minPrice
break
else:
answer += needMeat[i] * meatPrice[i]
print(answer)
|
if meatPrice[i]<minPrice:
| 18 |
decision
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[17])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
x=int(s[17])
| 4 |
value
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y%x)%2==0:
print('yes')
else:
print('no')
|
elif (y%x)%2==0:
| 14 |
operation
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2<0:
print('yes')
else:
print('no')
|
elif (y-x)%2<0:
| 14 |
decision
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
s=input()
s=s.split()
y=int(s[0])
x=z(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
x=z(s[1])
| 4 |
statement
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y==0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
s=input()
s=s.split()
y=int(s[0])
x=int(s[1])
if y<x-1 or x==0:
print('no')
else:
x-=1
if x==0:
if y<0:
print('yes')
else:
print('no')
elif (y-x)%2==0:
print('yes')
else:
print('no')
|
if y<0:
| 10 |
decision
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]<m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]>m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
if n%a[i]>m:
| 12 |
decision
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]<m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[x]<m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
if n%a[x]<m:
| 12 |
statement
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]<m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]>m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
if n%a[i]>m:
| 12 |
decision
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]<m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
import sys
n, k = input().split()
n, k = [int(n), int(k)]
a = list(map(int, input().split()))
m = 1000000
for i in range(k):
if n%a[i]>m:
m = n%a[i]
ans = i
print(ans+1, end=' ')
print(a[ans])
|
if n%a[i]>m:
| 12 |
decision
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.x([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
else:ans.x([(i,'0')])
| 9 |
statement
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1]<'0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
if(j[-1][1]<'0'):
| 12 |
decision
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1]<'1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
if(j[-1][1]<'1'):
| 6 |
decision
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0]-1,end = ' ')
print()
|
print(j[0]-1,end = ' ')
| 22 |
operation
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0] + 1,end = ' ')
print()
|
s = input()
ans = []
for i in range(len(s)):
if(s[i] == '0'):
for j in ans:
if(j[-1][1] == '1'):
j.append((i,0))
break
else:ans.append([(i,'0')])
else:
for j in ans:
if(j[-1][1] == '0'):
j.append((i,'1'))
break
else:
print("-1")
exit(0)
print(len(ans))
for i in ans:
print(len(i),end = ' ')
for j in i:
print(j[0]-1,end = ' ')
print()
|
print(j[0]-1,end = ' ')
| 22 |
operation
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(z<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
while(z<(l-1)):
| 10 |
statement
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l&1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
while(i<(l&1)):
| 10 |
operation
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j<1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
if(j<1):
| 21 |
decision
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-26)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
while(i<(l-26)):
| 10 |
value
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i-1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
L=list(map(int,input().split(" ")))
n=L[0]
d=L[1]
way=input()
def function(n,d,way):
k=0
l=len(way)
i=0
while(i<(l-1)):
for j in range(d,0,-1):
if(i+j)>(l-1):
j=l-i>>1
if j<1:
i=l+1
break
if way[i+j]=='1':
i+=j
k+=1
break
if(j==1):
break
return(k)
k=function(n,d,way)
if k==0:
print(-1)
else :
print(k)
|
j=l-i>>1
| 13 |
operation
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
| 9 |
operation
|
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i>max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
if i>max(tommy):
| 9 |
decision
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for y in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
for y in tommy:
| 9 |
statement
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)/max(bunbun))
|
print(max(new)/max(bunbun))
| 9 |
operation
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i < max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
n,m=[int(x) for x in input().split()]
tommy=[int(x) for x in input().split()]
bunbun=[int(x) for x in input().split()]
new=[]
for i in tommy:
if i>max(tommy):
new.append(i)
print(max(new)*max(bunbun))
|
if i>max(tommy):
| 9 |
decision
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))>a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
if(abs(ans[i]-ans[i-1]))>a:
| 13 |
decision
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]>=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
if(l[i]>=m):
| 7 |
decision
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(y)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
ans.append(y)
| 9 |
statement
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-154])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
a=abs(ans[i]-ans[i-154])
| 14 |
value
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)==0):
print("1")
else:
print(abs(m1-m2))
|
n=int(input())
l=list(map(int,input().split()))
m=min(l)
ans=[]
if(l.count(m)>1):
for i in range(n):
if(l[i]<=m):
m=l[i]
ans.append(i)
ans=sorted(ans)
a=10**9
for i in range(1,len(ans)):
if(abs(ans[i]-ans[i-1]))<a:
a=abs(ans[i]-ans[i-1])
print(a)
else:
m1=l.index(min(l))
l.pop(min(l))
m2=l.index(min(l))
if(abs(m1-m2)<0):
print("1")
else:
print(abs(m1-m2))
|
if(abs(m1-m2)<0):
| 20 |
decision
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
n,a,b=map(int,(input().split(" ")))
if(n==(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
if(n==(a+b)):
| 2 |
decision
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
n,a,b=map(int,(input().split(" ")))
if(n>(a&b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
if(n>(a&b)):
| 2 |
operation
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//y)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
R=(W//y)
| 13 |
statement
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//n
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
n,a,b=map(int,(input().split(" ")))
if(n>(a+b)):
output=0
elif(n==(a+b)):
output=1
else:
if(a>b):
W=b+b
R=(W)//z
output=(R)
elif(b>a):
W=a+a
R=(W//n)
output=(R)
elif(a==b):
W=a+b
R=(W//n)
output=R
print(output)
|
R=(W)//z
| 9 |
statement
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2==1:
print("Conan")
exit()
print("Agasa")
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%153==1:
print("Conan")
exit()
print("Agasa")
|
if values[i]%153==1:
| 9 |
value
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2==1:
print("Conan")
exit()
print("Agasa")
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2<1:
print("Conan")
exit()
print("Agasa")
|
if values[i]%2<1:
| 9 |
decision
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2==1:
print("Conan")
exit()
print("Agasa")
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]^2==1:
print("Conan")
exit()
print("Agasa")
|
if values[i]^2==1:
| 9 |
operation
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2==1:
print("Conan")
exit()
print("Agasa")
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2<1:
print("Conan")
exit()
print("Agasa")
|
if values[i]%2<1:
| 9 |
decision
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]%2==1:
print("Conan")
exit()
print("Agasa")
|
n = int(input())
a = list(map(int,input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
values[i] += 1
for i in reversed(a):
if values[i]>>2==1:
print("Conan")
exit()
print("Agasa")
|
if values[i]>>2==1:
| 9 |
operation
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h>0):
h+=12
|
if(h>0):
| 16 |
decision
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m>0):
m+=60
h-=1
if(h<0):
h+=12
|
if(m>0):
| 13 |
decision
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(z>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
while(z>=0):
| 5 |
statement
|
x=int(input())
h,m=input().strip().split(' ')
h,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
x=int(input())
h,m=input().strip().split(' ')
y,m=[int(h),int(m)]
y=0
while(m>=0):
s1=str(h)
s2=str(m)
if('7' in s1 or '7' in s2):
print(y)
break
m-=x
y+=1
if(m<0):
m+=60
h-=1
if(h<0):
h+=12
|
y,m=[int(h),int(m)]
| 3 |
statement
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap+1)]
loc=list(map(int,input().split()))
if tap==1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap+1)]
loc=list(map(int,input().split()))
if tap==1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/128)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/128)+1)
| 12 |
value
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap+1)]
loc=list(map(int,input().split()))
if tap==1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap/1)]
loc=list(map(int,input().split()))
if tap==1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
dp=[0 for _ in range(tap/1)]
| 5 |
operation
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap+1)]
loc=list(map(int,input().split()))
if tap==1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
import math
t=int(input())
while t>0:
size,tap=map(int,input().split())
dp=[0 for _ in range(tap+1)]
loc=list(map(int,input().split()))
if tap<1:
print(max(loc[0],size-loc[0]+1))
else:
dp[1]=loc[0]
for i in range(1,tap):
dp[i+1]=int(math.ceil((loc[i]-loc[i-1]-1)/2)+1)
dp[tap]=max(dp[tap],size-loc[tap-1]+1)
for j in range(tap-2,-1):
dp[j]=max(dp[j],int(math.ceil((loc[j]-loc[j-1]-1)/2)+1))
print(max(dp))
t-=1
|
if tap<1:
| 7 |
decision
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.