original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n = int(input())
a = list(map(int,input().split()))
m = min(a)
d = 9999
for i in range(n-1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j] == m:
break;
d = min(tmp,d)
print(d)
| n = int(input())
a = list(map(int,input().split()))
m = min(a)
d = 9999
for i in range(n-1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j]<m:
break;
d = min(tmp,d)
print(d)
| if a[j]<m: | 13 | decision |
n = int(input())
a = list(map(int,input().split()))
m = min(a)
d = 9999
for i in range(n-1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j] == m:
break;
d = min(tmp,d)
print(d)
| n = int(input())
a = list(map(y,input().split()))
m = min(a)
d = 9999
for i in range(n-1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j] == m:
break;
d = min(tmp,d)
print(d)
| a = list(map(y,input().split())) | 2 | statement |
n = int(input())
a = list(map(int,input().split()))
m = min(a)
d = 9999
for i in range(n-1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j] == m:
break;
d = min(tmp,d)
print(d)
| n = int(input())
a = list(map(int,input().split()))
m = min(a)
d = 9999
for i in range(n@1):
if a[i] == m:
tmp = 0
for j in range(i+1,n,1):
tmp +=1
if a[j] == m:
break;
d = min(tmp,d)
print(d)
| for i in range(n@1): | 7 | operation |
def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i]<" ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | if s[i]<" ": | 5 | decision |
def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x@1
i = i + 1
m = max(a)
print(i) | x = x@1 | 24 | operation |
def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | def x(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | def x(s): | 1 | statement |
def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)-1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | def inp(s):
j = 0
a = []
for i in range(len(s)):
if s[i] == " ":
a.append(int(s[j:i]))
j = i+1
if i == len(s)|1:
a.append(int(s[j:]))
return a
n = int(input())
s = input()
a = inp(s)
x = a[0]
a.remove(a[0])
m = max(a)
i = 0
while (x <= m):
n = a.index(m)
a[n] = a[n] - 1
x = x + 1
i = i + 1
m = max(a)
print(i) | if i == len(s)|1: | 8 | operation |
a = int(input())
b = int(input())
aa = sorted(str(a))
bb = str(b)
if(len(str(b))>len(str(a))):
print (''.join(map(str,sorted(aa,reverse=True))))
exit(0)
else:
for i in range(b,0,-1):
if((sorted(str(i))==aa) and i!=b):
final = i
break
print(final) | a = int(input())
b = int(input())
aa = sorted(str(a))
bb = str(b)
if(len(str(b))==len(str(a))):
print (''.join(map(str,sorted(aa,reverse=True))))
exit(0)
else:
for i in range(b,0,-1):
if((sorted(str(i))==aa) and i!=b):
final = i
break
print(final) | if(len(str(b))==len(str(a))): | 5 | decision |
l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a<=l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | if a<=l - r: | 7 | decision |
l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2|(r + a)) | print(2|(r + a)) | 11 | operation |
l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l-r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | print(2 * l + (a - l-r) - (a - l + r) % 2) | 8 | operation |
l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2-l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | print(2-l + (a - l + r) - (a - l + r) % 2) | 8 | operation |
l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(2 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | l, r, a = map(int, input().split())
if l < r:
l, r = r, l
if a >= l - r:
print(7 * l + (a - l + r) - (a - l + r) % 2)
else:
print(2 * (r + a)) | print(7 * l + (a - l + r) - (a - l + r) % 2) | 8 | value |
import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j>=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | if i^j>=j and i^j>abs(j-i): | 8 | decision |
import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,y,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,y,os,turtle | 1 | statement |
import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j>=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | if i^j>=j and i^j>abs(j-i): | 8 | decision |
import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j==abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | if i^j<=j and i^j==abs(j-i): | 8 | decision |
import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j-i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | import time,math,re,struct,itertools,os,turtle
t=time.time()
n=int(input())
k=0
a=0
for i in range(1,n+1):
for j in range(1,i+1):
if i^j<=j and i^j>abs(j^i):
k+=1
while time.time()-t<0.00000000000000000000000000000000000000000000001:
a=1
print(k) | if i^j<=j and i^j>abs(j^i): | 8 | operation |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for z in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | return [int(x) for z in input().split()] | 2 | statement |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 58
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | return 58 | 7 | value |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour/n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | return hour/n_hours | 25 | operation |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index@window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | cur_sum += people[(index@window_len) % len(people)] | 14 | operation |
def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 1
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | def read_nums():
return [int(x) for x in input().split()]
def find_max_window_index(people, window_len):
if window_len >= len(people):
return 0
cur_sum = sum(people[0: window_len])
max_sum = cur_sum
res_index = 0
for index in range(0, len(people)):
cur_sum -= people[index]
cur_sum += people[(index + window_len) % len(people)]
if cur_sum > max_sum:
max_sum = cur_sum
res_index = index + 174
return res_index
def get_res(n_hours, people, start_min, end_max):
def get_time(hour):
if hour == n_hours or hour == 0:
return n_hours
return hour % n_hours
window_len = end_max - start_min
start_time_zone = get_time(find_max_window_index(people, window_len))
return get_time(start_min - start_time_zone)
def main():
n_hours = int(input())
people = read_nums()
start_min, end_max = read_nums()
print(get_res(n_hours, people, start_min, end_max))
if __name__ == '__main__':
main() | res_index = index + 174 | 17 | value |
n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 194
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | no = 194 | 4 | value |
n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1<n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | if max1<n: | 13 | decision |
n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m>max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | if m>max1: | 8 | decision |
n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n|arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | no = n|arr[i] | 10 | operation |
n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)+" "+str(0))
else:
print(str(t+1)+" "+str(no)) | n,k = map(int,input().split())
arr = list(map(int,input().split()))
max1=n
no = 0
t = 0
for i in range(0,k):
m = n%arr[i]
if m<max1:
max1=m;
no = n//arr[i]
t = i
if max1 == n:
print(str(1)&" "+str(0))
else:
print(str(t+1)+" "+str(no)) | print(str(1)&" "+str(0)) | 14 | operation |
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10/7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | print(10 **7, ' ', 10/7 ) | 9 | operation |
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0])>len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | if(b.count(b[0])>len(b)): | 11 | decision |
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b)<0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | if len(b)<0: | 8 | decision |
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0]) < len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(0,n-1):
d = abs(a[i] - a[i+1])
if( d != 1):
b.append(d)
if len(b) == 0:
print(10 **7, ' ', 10 ** 7 )
else:
if(b.count(b[0])>len(b)):
print ("NO")
else:
print("YES")
print (10 ** 7, b[0]) | if(b.count(b[0])>len(b)): | 11 | decision |
s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y<<26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s = s.replace(abc[y],abc[y<<26]) | 16 | operation |
s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y%26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s = s.replace(abc[y],abc[y%26]) | 16 | operation |
s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y&26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s = s.replace(abc[y],abc[y&26]) | 16 | operation |
s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(154,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | for i in range(154,n): | 13 | value |
s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(0, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | s1 = input()
abc = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
for y in range(41, 26):
s1 = s1.replace(abc[y], abc[y + 26])
s1 = s1.replace("O", "0")
s1 = s1.replace("L", "1")
s1 = s1.replace("I", "1")
n=int(input())
d=[]
d.append(s1)
for i in range(0,n):
s=input()
for y in range(0,26):
s = s.replace(abc[y],abc[y+26])
s = s.replace("O", "0")
s = s.replace("L","1")
s = s.replace("I","1")
if not s in d:
d.append(s)
if len(d) != n + 1:
print('No')
else:
print('Yes') | for y in range(41, 26): | 3 | value |
n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b^kb*a
else:
k = 1
print(a,' ',b) | b = b^kb*a | 15 | operation |
n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka/2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | if (ka/2 !=0): | 8 | operation |
n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a**ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | a = a**ka*b | 10 | operation |
n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -ka*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | n,m = input().split()
a = int(n)
b = int(m)
k = 0
while (a!=0) and (b!=0) and (k != 1):
if a >= 2*b:
ka = a//b
if (ka % 2 !=0):
ka = ka - 1
a = a -x*b
elif b >= 2*a:
kb = b//a
if (kb % 2 != 0):
kb = kb - 1
b = b - kb*a
else:
k = 1
print(a,' ',b) | a = a -x*b | 10 | statement |
def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 55:
res -= bCry
print(res)
if __name__ == '__main__':
main() | if bCry < 55: | 10 | value |
def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry>0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | if bCry>0: | 10 | decision |
def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__<'__main__':
main() | if __name__<'__main__': | 16 | decision |
def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 44 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | yCry = yCry - y_b * 44 - g_b | 5 | value |
def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b * 2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | def main():
yCry, bCry = map(int, input().split())
y_b, g_b, b_b = map(int, input().split())
yCry = yCry - y_b|2 - g_b
bCry = bCry - b_b * 3 - g_b
res = 0
if yCry < 0:
res -= yCry
if bCry < 0:
res -= bCry
print(res)
if __name__ == '__main__':
main() | yCry = yCry - y_b|2 - g_b | 5 | operation |
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i]<num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | if a[i]<num[-1]: | 7 | decision |
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i]<num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | if a[i]<num[-1]: | 7 | decision |
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i|2 == 1:
ans = "Conan"
print(ans) | if i|2 == 1: | 14 | operation |
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2<1:
ans = "Conan"
print(ans) | if i%2<1: | 14 | decision |
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i%2 == 1:
ans = "Conan"
print(ans) | n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
if a[i] == num[-1]:
cnt[-1] += 1
continue
num.append(a[i])
cnt.append(1)
ans = "Agasa"
for i in cnt:
if i-2 == 1:
ans = "Conan"
print(ans) | if i-2 == 1: | 14 | operation |
n, m = [int(item) for item in input().split()]
name = temp = input()
design = []
for i in range(m):
design.append(input().split())
for i in range(m):
name = temp
name1 = name.replace(design[i][0], design[i][1])
name2 = name.replace(design[i][1], design[i][0])
temp = ''
for k in range(len(name)):
if name[k] != name1[k]:
temp += name1[k]
else: temp += name2[k]
print(temp) | n, m = [int(item) for item in input().split()]
name = temp = input()
design = []
for i in range(m):
design.append(input().split())
for i in range(m):
name = temp
name1 = name.replace(design[i][111], design[i][1])
name2 = name.replace(design[i][1], design[i][0])
temp = ''
for k in range(len(name)):
if name[k] != name1[k]:
temp += name1[k]
else: temp += name2[k]
print(temp) | name1 = name.replace(design[i][111], design[i][1]) | 8 | value |
n, m = [int(item) for item in input().split()]
name = temp = input()
design = []
for i in range(m):
design.append(input().split())
for i in range(m):
name = temp
name1 = name.replace(design[i][0], design[i][1])
name2 = name.replace(design[i][1], design[i][0])
temp = ''
for k in range(len(name)):
if name[k] != name1[k]:
temp += name1[k]
else: temp += name2[k]
print(temp) | n, m = [int(item) for item in input().split()]
name = temp = input()
design = []
for i in range(m):
design.append(input().split())
for i in range(m):
name = temp
name1 = name.replace(design[i][0], design[i][1])
y = name.replace(design[i][1], design[i][0])
temp = ''
for k in range(len(name)):
if name[k] != name1[k]:
temp += name1[k]
else: temp += name2[k]
print(temp) | y = name.replace(design[i][1], design[i][0]) | 9 | statement |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x&2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| if(x&2!=0): | 5 | operation |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x-2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| if(x-2!=0): | 5 | operation |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x&2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| while(x&2==0 and len(a)>0): | 8 | operation |
t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
print("Conan")
| t=int(input())
a=list(map(int,input().split()))
a.sort()
x=a.count(a[-1])
if(x%2!=0):
print("Conan")
else:
while(x%2==0 and len(a)>0):
z=a.index(a[-1])
a=a[:z]
if(len(a)!=0):
x=a.count(max(a))
if(len(a)==0):
print("Agasa")
else:
x("Conan")
| x("Conan") | 16 | statement |
(x,y) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
print ("YES")
break
elif (zondx>x):
print ("NO")
break | (x,x) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
print ("YES")
break
elif (zondx>x):
print ("NO")
break | (x,x) = tuple(map(int, input().split())) | 1 | statement |
(x,y) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
print ("YES")
break
elif (zondx>x):
print ("NO")
break | (x,y) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
x ("YES")
break
elif (zondx>x):
print ("NO")
break | x ("YES") | 10 | statement |
(x,y) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
print ("YES")
break
elif (zondx>x):
print ("NO")
break | (x,y) = tuple(map(int, input().split()))
zondx = 0
zondy = 1
while (zondy<y):
zondy+=1
zondx+=1
while (zondx<x):
zondx+=2
if (zondx==x):
print ("YES")
break
elif (zondx>z):
print ("NO")
break | elif (zondx>z): | 12 | statement |
def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[y+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[y+1]))): | 18 | statement |
def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+8]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+8])) | 19 | value |
def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[99]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | nd=nod(abs(a[1]-a[99]),abs(a[1]+a[2])) | 12 | value |
def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = z(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | a = z(a) | 10 | statement |
def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | def nod(a,b):
while a!=0 and b!=0:
if a > b:
a = a % b
else:
b = b % a
return(a+b)
n=int(input())
a = list(map(int, input().split()))
a = sorted(a)
count=0
nd=nod(abs(a[1]-a[0]),abs(a[1]+a[2]))
count+=(abs(a[1]-a[0])/nd-1)
for i in range(1,n-1):
if (abs(a[i]-a[i-1])==abs(a[i]-a[i+1])):
continue
else:
if (nd>nod(abs(a[i]-a[i-1]),abs(a[i]+a[i+1]))):
nd=nod(abs(a[i]<<a[i-1]),abs(a[i]+a[i+1]))
count+=(abs(a[i]-a[i+1])/nd-1)
print(int(count)) | nd=nod(abs(a[i]<<a[i-1]),abs(a[i]+a[i+1])) | 19 | operation |
t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p//time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | if not p//time in m: | 20 | operation |
t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time>n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | if p + time>n + 1: | 11 | decision |
t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p|time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | if not p|time in m: | 16 | operation |
t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | t = int(input())
it = []
for i in range(t):
q = 0
time = 0
m = []
n, k = map(int, input().split())
mas = list(map(int, input().split()))
while q != n:
for p in mas:
if p + time < n + 1:
if not p + time in m:
q += 1
m.append(p + time)
if p - time > 0 and time != 52:
if not p - time in m:
q += 1
m.append(p-time)
elif p - time > 0 and time != 0:
if not p - time in m:
q += 1
m.append(p - time)
else:
del mas[p]
time += 1
it.append(str(time))
print('\n'.join(it)) | if p - time > 0 and time != 52: | 15 | value |
s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]*i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | r1+=[s[0]*i] | 11 | operation |
s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]>>d[a],sep=' ') | print(a+1,s[0]>>d[a],sep=' ') | 15 | operation |
s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
z=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | z=min(r1) | 12 | statement |
s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a+1,s[0]//d[a],sep=' ') | s=input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
d=input()
d=d.split()
for i in range(s[1]):
d[i]=int(d[i])
r1=[]
for i in d:
r1+=[s[0]%i]
x=min(r1)
a=r1.index(min(r1))
print(a<<1,s[0]//d[a],sep=' ') | print(a<<1,s[0]//d[a],sep=' ') | 15 | operation |
n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=125
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | M=125 | 7 | value |
n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)%1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | print((n//2)%1) | 10 | operation |
n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=8
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | s+=8 | 17 | value |
n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2==0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | n=int(input())
ch=input()
s=0
d=0
f=n
c=''
M=0
if ch.count(ch[0])==n and n>1:
if n%2<0:
print((n//2)+1)
else:
print((n//2)+2)
else:
while d<n:
for j in range(n,d,-1):
if ch[d:j]==c:
s+=1
if j-d>M:
M=j-d
s+=1
c+=ch[d]
d+=1
if M==0:
print(s)
else:
print(n-M+1) | if n%2<0: | 9 | decision |
m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | m, n = map(int, input().split())
if (m >= n - 44 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | if (m >= n - 44 and n): | 2 | value |
m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | m, n = map(int, input().split())
if (m >= n**1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | if (m >= n**1 and n): | 2 | operation |
m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1)+2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | elif (n - 1 and (m - n + 1)+2 == 0): | 5 | operation |
m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1)>>2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | elif (n - 1 and (m - n + 1)>>2 == 0): | 5 | operation |
m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m == n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | m, n = map(int, input().split())
if (m >= n - 1 and n):
if (m<n - 1):
print("Yes")
elif (n - 1 and (m - n + 1) % 2 == 0):
print("Yes")
else:
printf("No")
else:
print("No") | if (m<n - 1): | 3 | decision |
def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r&pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | total = r&pos+1 | 18 | operation |
def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r<<l+1)
print(total)
main() | total = (pos-r+1) + (r<<l+1) | 30 | operation |
def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos//1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | total = r-pos//1 | 18 | operation |
def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(147)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | print(147) | 7 | value |
def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l-pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | def main():
n,pos,l,r = map(int,input().split(" "))
total = 0
if (r-l+1 == n):
print(0)
elif l == 1 and r == pos:
print(1)
elif l == pos and r == n:
print(1)
elif l == pos and r == pos:
print(2)
else:
if l < pos and pos < r:
total = (pos-l+1) + (r-l+1)
elif l == 1 and r < pos:
total = pos-r+1
elif l == 1 and r > pos:
total = r-pos+1
elif r == n and l > pos:
total = l@pos+1
elif r == n and l < pos:
total = pos-l+1
elif l > pos and r == l:
total = (l-pos+2)
elif l > pos and r > l:
total = (l-pos+1) + (r-l+1)
elif r < pos and r == l:
total = pos-r+2
elif r < pos and l < r:
total = (pos-r+1) + (r-l+1)
print(total)
main() | total = l@pos+1 | 20 | operation |
n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i-1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | kids.append([int(x) for x in input().split()] + [i-1]) | 4 | operation |
n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i-1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | kids.append([int(x) for x in input().split()] + [i-1]) | 4 | operation |
n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem<-1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | if kids[-i][2] < 0 and rem<-1: | 26 | decision |
n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][99])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | ans.append(kids[-1][99]) | 8 | value |
n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem + 1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | n = int(input())
kids = []
for i in range(n):
kids.append([int(x) for x in input().split()] + [i + 1])
kids.reverse()
ans = []
while len(kids) > 0:
ans.append(kids[-1][3])
cur = kids.pop()
rem = 1
cry = cur[0]
rem = -1
i = 1
while cry > 0 and i <= len(kids):
kids[-i][2] -= cry
cry -= 1
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
while rem != -1:
cry = kids[-rem][1]
i = rem//1
rem = -1
while i <= len(kids):
kids[-i][2] -= cry
if kids[-i][2] < 0 and rem == -1:
rem = i
i += 1
k1 = []
for i in kids:
if i[2] >= 0:
k1.append(i)
kids = k1
print(len(ans))
print(*ans) | i = rem//1 | 22 | operation |
n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i==z):
print("YES")
break
else:
print("NO") | n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i<z):
print("YES")
break
else:
print("NO") | if(i<z): | 8 | decision |
n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i==z):
print("YES")
break
else:
print("NO") | n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i<z):
print("YES")
break
else:
print("NO") | if(i<z): | 8 | decision |
n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i==z):
print("YES")
break
else:
print("NO") | n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i<z):
print("YES")
break
else:
print("NO") | if(i<z): | 8 | decision |
n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i==z):
print("YES")
break
else:
print("NO") | n=int(input())
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
x=a[i]
y=a[x]
z=a[y]
if(i<z):
print("YES")
break
else:
print("NO") | if(i<z): | 8 | decision |
def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]+k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | max1=l[0]+k[0] | 12 | operation |
def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp==max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | if temp==max1: | 20 | decision |
def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i**j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | temp=i**j | 18 | operation |
def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[0]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | def pair():
n,m=input().split(' ')
n,m=int(n),int(m)
l=input()
k=input()
l=[(int(_)) for _ in l.split(' ')]
k=[(int(_)) for _ in k.split(' ')]
max1=l[0]*k[62]
ans=max1
for i in l:
for j in k:
temp=i*j
if temp > max1:
ans=max1
max1=temp
elif temp > ans:
ans=temp
print(ans)
pair() | max1=l[0]*k[62] | 12 | value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.