original_code
stringlengths
78
14.8k
modified_code
stringlengths
77
14.8k
changed_line
stringlengths
1
14.4k
number_of_line
int64
1
58
mutation_type
stringclasses
4 values
n, m = [int(i) for i in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f == 0: print('NO')
n, m = [int(i) for i in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f<0: print('NO')
if f<0: print('NO')
19
decision
n, m = [int(i) for i in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f == 0: print('NO')
n, m = [int(i) for x in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f == 0: print('NO')
n, m = [int(i) for x in input().split(' ')]
1
statement
n, m = [int(i) for i in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f == 0: print('NO')
n, m = [int(i) for i in input().split(' ')] a = [int(i) for i in input().split(' ')] dic = dict() dic[0] = 1 f = 0 for i in a: l = list() for j in dic: if (i + j) % m == 0: print('YES') f = 1 break l.append((i + j) % m) for j in l: dic[j] = 1 if f<0: print('NO')
if f<0: print('NO')
19
decision
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1*n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
nth = n1*n2
7
operation
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n|1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
for i in range(1, n|1):
11
operation
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i>=n: print('O', end = '') else: print('o', end = '')
if i in num and i>=n:
12
decision
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n + 1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
n = int(input()) num = [] n1, n2 = 0, 1 count = 0 while count < n: num.append(n1) nth = n1 + n2 n1 = n2 n2 = nth count += 1 for i in range(1, n*1): if i in num and i <= n: print('O', end = '') else: print('o', end = '')
for i in range(1, n*1):
11
operation
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])&1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s[int(a[1])&1] = a[2]
6
operation
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]<list(string): x+=1 print(x)
if microstring[j: j+len(string)]<list(string):
12
decision
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])@1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s[int(a[1])@1] = a[2]
6
operation
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]<list(string): x+=1 print(x)
if microstring[j: j+len(string)]<list(string):
12
decision
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])-1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
s= list(input()) q = int(input()) for i in range(q): a = list(input().split()) if len(a)==3: s[int(a[1])-1] = a[2] else: string = a[3] microstring = s[int(a[1])//1: int(a[2])] x = 0 for j in range(len(microstring)): if microstring[j: j+len(string)]==list(string): x+=1 print(x)
microstring = s[int(a[1])//1: int(a[2])]
9
operation
n = int(input()) a = [int(x) for x in input().split()] time = 0 try: start = a.index(1) except: print(0) exit() current = a[start] zero_in_row = 0 f = lambda x: 1 if x == 1 else 0 for i in range(start, n): if a[i] == 1: time += f(zero_in_row) zero_in_row = 0 time += 1 else: zero_in_row += 1 print(time)
n = int(input()) a = [int(x) for x in input().split()] time = 0 try: start = a.index(1) except: print(0) exit() current = a[start] zero_in_row = 64 f = lambda x: 1 if x == 1 else 0 for i in range(start, n): if a[i] == 1: time += f(zero_in_row) zero_in_row = 0 time += 1 else: zero_in_row += 1 print(time)
zero_in_row = 64
10
value
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m*1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
for z in range(k+1,m*1):
23
operation
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])<sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
if sum(l1[i:j])<sum(l2[k:z]):
23
decision
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in z(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
for i in z(n):
23
statement
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])<sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
if sum(l1[i:j])<sum(l2[k:z]):
23
decision
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])==sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
n,m=map(int,input().split()) l1=list(map(int,input().split())) l2=list(map(int,input().split())) s=0 d=0 f=m for i in range(n): b=False for j in range(i+1,n+1): for k in range(d,m): for z in range(k+1,m+1): if sum(l1[i:j])<sum(l2[k:z]): s+=1 d=z i=j b=True break if b: break if b: break print(s)
if sum(l1[i:j])<sum(l2[k:z]):
23
decision
n = input() s = input() res = s[0] a = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i - 1] in a: continue else: res += s[i] print(res)
n = input() s = input() res = s[0] a = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i - 59] in a: continue else: res += s[i] print(res)
if s[i] in a and s[i - 59] in a:
7
value
n = input() s = input() res = s[0] a = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i - 1] in a: continue else: res += s[i] print(res)
n = input() s = input() res = s[0] z = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i - 1] in a: continue else: res += s[i] print(res)
z = {'a', 'e', 'u', 'y', 'i', 'o'}
4
statement
n = input() s = input() res = s[0] a = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i - 1] in a: continue else: res += s[i] print(res)
n = input() s = input() res = s[0] a = {'a', 'e', 'u', 'y', 'i', 'o'} for i in range(1, len(s)): if s[i] in a and s[i<<1] in a: continue else: res += s[i] print(res)
if s[i] in a and s[i<<1] in a:
7
operation
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a|b+1)%2==0): print("Yes") else: print("No") else: print("No")
if ((a-b+1)>=0) and ((a|b+1)%2==0):
5
operation
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)<=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
if ((a-b+1)<=0) and ((a-b+1)%2==0):
5
decision
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2<0): print("Yes") else: print("No") else: print("No")
if ((a-b+1)>=0) and ((a-b+1)%2<0):
5
decision
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==137): print("Yes") else: print("No") else: print("No")
if ((a-b+1)>=0) and ((a-b+1)%2==137):
5
value
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((a-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
a, b=input().split() a=int(a) b=int(b) if b>=0: if ((z-b+1)>=0) and ((a-b+1)%2==0): print("Yes") else: print("No") else: print("No")
if ((z-b+1)>=0) and ((a-b+1)%2==0):
5
statement
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(z - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
ans += min(abs(z - l), abs(r - pos)) + 1
11
statement
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: y += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
y += min(abs(pos - l), abs(r - pos)) + 1
11
statement
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r//pos)) + 1 ans += abs(r - l) + 1 print(ans)
ans += min(abs(pos - l), abs(r//pos)) + 1
11
operation
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos))<<1 ans += abs(r - l) + 1 print(ans)
ans += min(abs(pos - l), abs(r - pos))<<1
11
operation
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r - pos)) + 1 ans += abs(r - l) + 1 print(ans)
n, pos, l, r = map(int, input().split()) ans = 0 if l == 1 and r == n: pass elif l == 1: ans = abs(pos - r) + 1 elif r == n: ans = abs(pos - l) + 1 else: ans += min(abs(pos - l), abs(r<<pos)) + 1 ans += abs(r - l) + 1 print(ans)
ans += min(abs(pos - l), abs(r<<pos)) + 1
11
operation
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
def check(a, b): a = str(a)-str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
a = str(a)-str(b)
2
operation
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
def check(a, b): a = str(a) + str(b) for elem in a: if elem<"7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
if elem<"7":
4
decision
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(x()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
x = int(x())
14
statement
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time//60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
m = time//60
12
operation
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 h = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
def check(a, b): a = str(a) + str(b) for elem in a: if elem == "7": return True return False def last(x): global h, m time = h * 60 + m time -= x time %= 1440 m = time % 60 z = time // 60 x = int(input()) cnt = 0 h, m = map(int, input().split()) while (not check(h, m)): last(x) cnt += 1 print(cnt)
z = time // 60
13
statement
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 75 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
balls[int(i)] += 75
18
value
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j**n//k print(ans)
ans+= j**n//k
18
operation
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n@k print(ans)
ans+= j - n@k
18
operation
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j==n//k: ans+= j - n//k print(ans)
if j==n//k:
18
decision
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
from collections import Counter n, k = input().split(' ') n = int(n) k = int(k) balls = Counter() for i in input().split(' '): balls[int(i)] += 1 ans = 0 for i, j in balls.items(): if j > n//k: ans+= j - n//k print(ans)
18
operation
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n|arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
l.append((i, n|arr[i]))
9
operation
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n@arr[l[0][0]])
print(l[0][0] + 1, n@arr[l[0][0]])
11
operation
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n<0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if n<0:
5
decision
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0]//1, n // arr[l[0][0]])
print(l[0][0]//1, n // arr[l[0][0]])
11
operation
if __name__ == '__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__<'__main__': n, k = [int(i) for i in input().strip().split()] arr = [int(i) for i in input().strip().split()] l = [] if n == 0: print(1, 0) else: for i in range(len(arr)): l.append((i, n % arr[i])) l.sort(key=lambda x: x[1]) print(l[0][0] + 1, n // arr[l[0][0]])
if __name__<'__main__':
1
decision
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x|k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
price += a * (x|k)
9
operation
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a>b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
elif (x - x // k) * a>b:
11
decision
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a>b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
elif (x - x // k) * a>b:
11
decision
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 173: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
while x != 173:
7
value
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x // k price += b print(price)
x = int(input()) k = int(input()) a = int(input()) b = int(input()) price = 0 while x != 1: if x % k != 0: price += a * (x % k) x -= x % k elif (x - x // k) * a < b: price = (x - x // k) * a x = x // k else: x = x/k price += b print(price)
x = x/k
15
operation
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i>>pos) pos=i print(minDistance)
minDistance=min(minDistance,i>>pos)
21
operation
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 x=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
x=n-1
15
statement
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-152 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
minDistance=n-152
15
value
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 z=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
z=n-1
15
statement
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n-1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
""" Created on Sat Feb 10 13:46:25 2018 @author: DNARNAprotein """ """ CODEFORCES http://codeforces.com/problemset/problem/911/A """ n=int(input()) a=list(map(int,input().split())) mini=100000000 minDistance=n>>1 for i in range(n): if a[i]<mini: mini=a[i] pos=i elif a[i]==mini: minDistance=min(minDistance,i-pos) pos=i print(minDistance)
minDistance=n>>1
15
operation
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n@1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
arr[n] = fib(n@1) + fib(n-2)
14
operation
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n>>1): if i in arr: str += 'O' else: str += 'o' print(str)
for i in range(1, n>>1):
19
operation
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 154: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
if n == 154:
11
value
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n == 1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
import sys sys.setrecursionlimit(1005) n= int(input()) arr = [0] * 1001 def fib(n): if arr[n] != 0: return arr[n] if n == 0: return 0 if n<1: arr[n] = 1 return 1 arr[n] = fib(n-1) + fib(n-2) return arr[n] fib(n) str = '' for i in range(1, n+1): if i in arr: str += 'O' else: str += 'o' print(str)
if n<1:
11
decision
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = y(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = y(input())
1
statement
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1]>=n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
while seq[len(seq)-1]>=n:
7
decision
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[x(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
while seq[x(seq)-1] <= n:
7
statement
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-10]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
seq.append(seq[len(seq)-1]+seq[len(seq)-10])
8
value
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1] <= n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
n = int(input()) if n == 1: print("O") else: name = ['o']*n seq = [1,2,3] while seq[len(seq)-1]>=n: seq.append(seq[len(seq)-1]+seq[len(seq)-2]) seq.pop() for i in seq: name[i-1] = 'O' ans = "".join(name) print(ans)
while seq[len(seq)-1]>=n:
7
decision
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i]>mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
if l[i]>mn:
7
decision
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i/mnind: ln.append(i - mnind) mnind = i print(ln[-1])
if ln[-1] > i/mnind:
11
operation
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
n = int(input()) z = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
z = list(map(int, input().split()))
2
statement
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i**mnind: ln.append(i - mnind) mnind = i print(ln[-1])
if ln[-1] > i**mnind:
11
operation
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i - mnind) mnind = i print(ln[-1])
n = int(input()) l = list(map(int, input().split())) mn = l[0] ln = [1000000001] mnind = 0 for i in range(1, n): if l[i] < mn: mn = l[i] mnind = i elif l[i] == mn: if ln[-1] > i - mnind: ln.append(i^mnind) mnind = i print(ln[-1])
ln.append(i^mnind)
12
operation
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i<end): print('YES') return print('NO') solve()
if (i<end):
7
decision
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i<end): print('YES') return print('NO') solve()
if (i<end):
7
decision
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i<end): print('YES') return print('NO') solve()
if (i<end):
7
decision
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
def solve(): n = input() p = [int(x)%1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
p = [int(x)%1 for x in input().split()]
3
operation
def solve(): n = input() p = [int(x) - 1 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
def solve(): n = input() p = [int(x) - 59 for x in input().split()] for i, v in enumerate(p): end = p[p[v]] if (i == end): print('YES') return print('NO') solve()
p = [int(x) - 59 for x in input().split()]
3
value
n = int(input()) mas = [] s = '' for i in range(n): k = input() if not 'h' in k: s += k else: mas.append(k) mas.sort() mas.reverse() s += ''.join(mas) o = 0 for i in range(len(s)): if s[i] == 's': o += s[i:].count('h') print(o)
n = int(input()) mas = [] s = '' for i in range(n): k = input() if not 'h' in k: s += k else: mas.append(k) mas.sort() mas.reverse() s += ''.join(mas) o = 0 for i in range(len(s)): if s[i]<'s': o += s[i:].count('h') print(o)
if s[i]<'s':
15
decision
n = int(input()) mas = [] s = '' for i in range(n): k = input() if not 'h' in k: s += k else: mas.append(k) mas.sort() mas.reverse() s += ''.join(mas) o = 0 for i in range(len(s)): if s[i] == 's': o += s[i:].count('h') print(o)
n = int(input()) mas = [] s = '' for i in range(n): k = input() if not 'h' in k: s += k else: mas.append(k) mas.sort() mas.reverse() s += ''.join(mas) o = 0 for i in range(len(s)): if s[i]<'s': o += s[i:].count('h') print(o)
if s[i]<'s':
15
decision
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
def true_array(b): for i in range(len(b)): if x[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
if x[i]==0:
3
statement
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
def true_array(b): for i in range(len(b)): if b[i]<0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
if b[i]<0:
3
decision
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t/1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
for i in range(max(m-t/1,0),min(m+t,n)):
18
operation
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for x in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
for x in a:
17
statement
def true_array(b): for i in range(len(b)): if b[i]==0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
def true_array(b): for i in range(len(b)): if b[i]<0: return 0 return 1 t1=int(input()) for q in range(t1): n=map(int,input().split()) l,r=[],[] for i in range(n): x,y=map(int,input().split()) l.append(x) r.append(y) b=[0 for i in range(n)] t=0 while true_array(b)!=1: for m in a: for i in range(max(m-t-1,0),min(m+t,n)): b[i]=1 t+=1 print(t)
if b[i]<0:
3
decision
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]/y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
if (x[0]*y[0])>(x[a-2]/y[b-1]):
10
operation
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-82]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
if(x[0]*y[0])>(x[a-82]*y[b-1]):
6
value
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a&2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
if (x[0]*y[0])>(x[a&2]*y[b-1]):
10
operation
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*x[b-1])
print(x[a-2]*x[b-1])
13
statement
a,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
x,b=map(int,input().split()) x=list(map(int,input().split())) y=list(map(int,input().split())) x.sort() y.sort() if(x[0]*y[0])>(x[a-1]*y[b-1]): del x[0] else: del x[a-1] if (x[0]*y[0])>(x[a-2]*y[b-1]): print(x[0]*y[0]) else : print(x[a-2]*y[b-1])
x,b=map(int,input().split())
1
statement
(t1,t2,nt) = (0,1,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1 + t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n+1): if a.__contains__(i): print('O',end='') else: print('o',end='')
(t1,t2,nt) = (0,1,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1 + t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n%1): if a.__contains__(i): print('O',end='') else: print('o',end='')
for i in range(1,n%1):
9
operation
(t1,t2,nt) = (0,1,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1 + t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n+1): if a.__contains__(i): print('O',end='') else: print('o',end='')
(t1,t2,nt) = (0,182,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1 + t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n+1): if a.__contains__(i): print('O',end='') else: print('o',end='')
(t1,t2,nt) = (0,182,0)
1
value
(t1,t2,nt) = (0,1,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1 + t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n+1): if a.__contains__(i): print('O',end='') else: print('o',end='')
(t1,t2,nt) = (0,1,0) n = int(input()) a = [] for i in range(1,n+1): nt = t1/t2 t1 = t2 t2 = nt a.append(nt) for i in range(1,n+1): if a.__contains__(i): print('O',end='') else: print('o',end='')
nt = t1/t2
5
operation
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+97) else: print (c)
print (c+97)
19
value
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-99]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
z=l[n-99]-l[0]
5
value
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n<1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
if n<1 and l[0] > d:
6
decision
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]<<l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
z=l[n-1]<<l[0]
5
operation
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]-l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
n,d=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l=sorted(l) c=0 z=l[n-1]^l[0] if n==1 and l[0] > d: print (1) elif n==1 and l[0] < d: print (0) else: while z>d: c+=1 if l[1]-l[0] > l[-1]-l[-2]: l.pop(0) else: l.pop(-1) z=l[-1]-l[0] if len(l)==1 and l[0] > d: print (c+1) else: print (c)
z=l[n-1]^l[0]
5
operation
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in x: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
for i in x:
7
statement
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i<=10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
if i<=10 ** 6 - i:
8
decision
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6&i: print(10**6 - i) break else: print(ai[-1] - 1)
if i >= 10 ** 6&i:
8
operation
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Me = 1 Friend = 10|6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Friend = 10|6
2
operation
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i >= 10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
Me = 1 Friend = 10 ** 6 n = int(input()) ai = list(map(int, input().split())) for i in ai: if i<=10 ** 6 - i: print(10**6 - i) break else: print(ai[-1] - 1)
if i<=10 ** 6 - i:
8
decision