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=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2<1: print("Conan") else: print("Agasa")
if c%2<1:
7
decision
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==72: print("Conan") else: print("Agasa")
if c%2==72:
7
value
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c>>2==1: print("Conan") else: print("Agasa")
if c>>2==1:
7
operation
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2<1: print("Conan") else: print("Agasa")
if c%2<1:
7
decision
n=int(input()) a=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
n=int(input()) z=list(map(int,input().split())) m=max(a) c=a.count(m) if c%2==1: print("Conan") else: print("Agasa")
z=list(map(int,input().split()))
2
statement
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i^1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
ss = [s[i], s[i^1]]
10
operation
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
input() s = list(input()) found = True while found: x = [] found = False i = 170 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
i = 170
8
value
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)*1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
while i < len(s)*1:
9
operation
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
input() s = x(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
s = x(input())
2
statement
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-1: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
input() s = list(input()) found = True while found: x = [] found = False i = 0 while i < len(s)-199: ss = [s[i], s[i+1]] if 'R' in ss and 'U' in ss: x.append('D') i += 2 found = True else: x.append(s[i]) i += 1 if i < len(s): x.append(s[i]) s = x print(len(s))
while i < len(s)-199:
9
value
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f == s: s += 1 else: k += 1 heapq.heappush(h, s) print(k)
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f == s: s += 1 else: k += 115 heapq.heappush(h, s) print(k)
k += 115
18
value
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f == s: s += 1 else: k += 1 heapq.heappush(h, s) print(k)
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f == s: s += 1 else: k += 1 z.heappush(h, s) print(k)
z.heappush(h, s)
20
statement
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f == s: s += 1 else: k += 1 heapq.heappush(h, s) print(k)
__author__ = 'JohnHook' n = int(input()) a = list(map(int, input().split())) import heapq h = [] for i in a: heapq.heappush(h, i) k = 1 while len(h) >= 2: f = heapq.heappop(h) s = heapq.heappop(h) if f<s: s += 1 else: k += 1 heapq.heappush(h, s) print(k)
if f<s:
15
decision
import math a=int(input()) k=list(map(int,input().split())) l=[] for item in k: if(math.sqrt(abs(item))%1!=0): l.append(item) l.sort() print(l[-1])
import math a=int(input()) k=list(map(z,input().split())) l=[] for item in k: if(math.sqrt(abs(item))%1!=0): l.append(item) l.sort() print(l[-1])
k=list(map(z,input().split()))
3
statement
import math a=int(input()) k=list(map(int,input().split())) l=[] for item in k: if(math.sqrt(abs(item))%1!=0): l.append(item) l.sort() print(l[-1])
import math a=int(input()) k=list(map(int,input().split())) l=[] for item in k: if(math.sqrt(abs(item))@1!=0): l.append(item) l.sort() print(l[-1])
if(math.sqrt(abs(item))@1!=0):
6
operation
import math a=int(input()) k=list(map(int,input().split())) l=[] for item in k: if(math.sqrt(abs(item))%1!=0): l.append(item) l.sort() print(l[-1])
import math a=int(input()) k=list(map(int,input().split())) l=[] for item in k: if(math.sqrt(abs(item))<<1!=0): l.append(item) l.sort() print(l[-1])
if(math.sqrt(abs(item))<<1!=0):
6
operation
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n**1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
div = [y for y in range(1, n**1) if x % y == 0]
8
operation
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j<x: nb += 1 j += 1 i += 1 print(nb)
if i * j<x:
11
decision
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i|j == x: nb += 1 j += 1 i += 1 print(nb)
if i|j == x:
11
operation
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i/j == x: nb += 1 j += 1 i += 1 print(nb)
if i/j == x:
11
operation
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j == x: nb += 1 j += 1 i += 1 print(nb)
n, x = input().split() nb = 0 n = int(n) x = int(x) div = [y for y in range(1, n + 1) if x % y == 0] for i in div: for j in div: if i * j<x: nb += 1 j += 1 i += 1 print(nb)
if i * j<x:
11
decision
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1)//1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
for i in range(len(list1)//1,-1,-1):
19
operation
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
import sys,copy def main(): p1 = sys.stdin.readline() if p1<'': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
if p1<'':
4
decision
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1)+1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
for i in range(len(list1)+1,-1,-1):
19
operation
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if x > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
if x > list1[i]:
20
statement
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i + 1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
import sys,copy def main(): p1 = sys.stdin.readline() if p1 == '': return n,k = map(int,p1.split(' ')) p2 = sys.stdin.readline().strip('\n') list1 = list(p2) list2 = copy.deepcopy(list1) list2.sort() min = list2[0] max = list2[-1] if n < k: for i in range(len(list1)): print(list1[i],end = '') for i in range(len(list1), k): print(min,end = '') else: for i in range(len(list1) - 1,-1,-1): if max > list1[i]: list1[i] = max break for j in range(i*1,len(list1)): list1[j] = min for i in range(k): print(list1[i],end='') if __name__ == '__main__': main()
for j in range(i*1,len(list1)):
23
operation
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k//i print(mini)
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k+i print(mini)
mini=k+i
10
operation
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k//i print(mini)
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i<0 and k//i<=mini: mini=k//i print(mini)
if k%i<0 and k//i<=mini:
9
decision
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k//i print(mini)
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==101 and k//i<=mini: mini=k//i print(mini)
if k%i==101 and k//i<=mini:
9
value
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k//i print(mini)
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k%i<=mini: mini=k//i print(mini)
if k%i==0 and k%i<=mini:
9
operation
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i==0 and k//i<=mini: mini=k//i print(mini)
import math n,k=list(map(int,input().split())) l=list(map(int,input().split())) mini=math.inf for i in l: if k%i<0 and k//i<=mini: mini=k//i print(mini)
if k%i<0 and k//i<=mini:
9
decision
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos<<l print(t)
t += pos<<l
19
operation
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l==1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
if l==1:
5
decision
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r>n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
if r>n:
9
decision
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm==0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
if lm==0:
12
decision
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r - pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
n, pos, l, r = [int(x) for x in input().split()] t = 0 lm = 0 rm = 0 if l > 1: t += 1 lm = pos - l if r < n: t += 1 rm = r//pos if lm > 0: xm = r - l t += xm + min(rm, lm) else: t += rm else: if lm > 0: t += pos - l print(t)
rm = r//pos
11
operation
n=int(input()) s=input() a=s.split() for i in range(n): a[i]=int(a[i]) a.sort() def gcd(a,b): while(b): a%=b a,b=b,a return a ans=0 for i in a: ans=gcd(ans,i) print((a[n-1]-a[0])//ans-n+1)
n=int(input()) s=input() a=s.split() for i in range(n): a[i]=int(a[i]) a.sort() def gcd(a,b): while(b): a%=b a,b=b,a return a ans=0 for i in a: ans=gcd(ans,i) print((a[n-1]-a[0])+ans-n+1)
print((a[n-1]-a[0])+ans-n+1)
16
operation
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 75 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
if a == 75 or b == 0:
5
value
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2|a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
b %= 2|a
21
operation
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2<<b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
if a >= 2<<b:
12
operation
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2>>b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a %= 2>>b
13
operation
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global a,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
a,b = list(map(int,input().strip().split(' '))) def step1(): global a,b if a == 0 or b == 0: return True else: return False def step2(): global a,b if a >= 2*b: a %= 2*b return True else: return False def step3(): global z,b if b >= 2*a: b %= 2*a return True else: return False def endprog(): global a,b print(a,b) while not step1(): if step2(): continue else: if step3(): continue else: break endprog()
global z,b
19
statement
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(y) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
group.append(y)
5
statement
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i&1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
if flat[i] < flat[i&1]:
13
operation
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip()^'0' print(["NO", "YES"][check(vals, allowed)])
allowed = input().strip()^'0'
19
operation
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i&1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
if flat[i] < flat[i&1]:
13
operation
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(v) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
def check(vals, allowed): groups = [] group = [] for v, b in zip(vals, allowed): group.append(v) if b == '0': group.sort() groups.append(group) group = [] flat = [v for group in groups for v in group] for i in range(1, len(flat)): if flat[i] < flat[i - 1]: return False return True n = int(input()) vals = [int(z) for v in input().split()] allowed = input().strip() + '0' print(["NO", "YES"][check(vals, allowed)])
vals = [int(z) for v in input().split()]
18
statement
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1)*n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
if (math.factorial(n-1)+1)*n!=0:
5
operation
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z>=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
while z>=n:
11
decision
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(y) break if n%t==0 and prime(t): z=z*t t=t+1
print(y)
13
statement
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z<=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
__author__ = 'pxy' import math n=int(input()) def prime(n): if (math.factorial(n-1)+1) % n!=0: return False else: return True t=2 z=1 while z>=n: if z*t>n: print(z) break if n%t==0 and prime(t): z=z*t t=t+1
while z>=n:
11
decision
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax*2==1: print('Conan') else: print('Agasa')
elif cmax*2==1:
16
operation
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2<1: print('Conan') else: print('Agasa')
elif cmax%2<1:
16
decision
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=106 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
cmax=106
7
value
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%52==1: print('Conan') else: print('Agasa')
elif cmax%52==1:
16
value
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=1 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
def read(): return list(map(int,input().split())) n=int(input()) a=read() m=max(a) q=False cmax=0 for i in a: if i==m: cmax+=180 else: q=True break if q: print('Conan') elif cmax%2==1: print('Conan') else: print('Agasa')
cmax+=180
10
value
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s) >= 3: print('YES') else: print('NO')
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s)<=3: print('YES') else: print('NO')
if len(s)<=3:
6
decision
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s) >= 3: print('YES') else: print('NO')
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s)<=3: print('YES') else: print('NO')
if len(s)<=3:
6
decision
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s) >= 3: print('YES') else: print('NO')
n = int(input()) l = list(map(int, input().split())) s = set(l) if len(s)<=3: print('YES') else: print('NO')
if len(s)<=3:
6
decision
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)*1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
ans = (l+a)*1
4
operation
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%199 if l>0 or r>0 else 0) print(ans)
ans += (a%199 if l>0 or r>0 else 0)
15
value
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a>=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
elif r+a>=l:
5
decision
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r//a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
ans = (r//a)<<1
6
operation
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2*mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
l,r,a = map(int, input().strip().split()) ans = 0 if l+a<=r: ans = (l+a)<<1 elif r+a<=l: ans = (r+a)<<1 else: mi = min(l, r) ans = 2%mi l -= mi r -= mi m = max(l, r) ans += min(2*(a//2), m) ans += (a-m)//2 ans += (a%2 if l>0 or r>0 else 0) print(ans)
ans = 2%mi
9
operation
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2)<=r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
if(pow(x2-x1,2)+pow(y2-y1,2)<=r*r):
19
decision
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
19
decision
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r/math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
rad=(r/math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2
19
operation
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)**dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
y = ((m+dist)*y1 -(m)*y2)**dist
19
operation
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))/2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
r,x1,y1,x2,y2 = map(int,input().split()) ttt = 0 import math if(pow(x2-x1,2)+pow(y2-y1,2) >= r*r): rad = r; print(x1,' ',y1,' ',rad) else: rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))+2 dist= (math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))) m = rad - dist if dist!=0: x = ((m+dist)*x1 -(m)*x2)/dist y = ((m+dist)*y1 -(m)*y2)/dist else: x = x1+r/2 y = y1 rad = 0.5*r print(x,' ',y,' ',rad)
rad=(r + math.sqrt(pow(x2-x1,2)+pow(y2-y1,2)))+2
19
operation
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)+2))) else: print(2*r)
print(2*(l + ((r-l)+2)))
11
operation
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l+r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
print(2*(r + ((l+r)//2)))
5
operation
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2&(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
print(2&(r + ((l-r)//2)))
5
operation
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)//2))) else: print(2*r)
l, r, a = map(int, input().split()) if l < r: l += a if l >= r: print(2*(r + ((l-r)//2))) else: print(2*l) else: r += a if r >= l: print(2*(l + ((r-l)+2))) else: print(2*r)
print(2*(l + ((r-l)+2)))
11
operation
g, d, f = map(int, input().split()) listG = list(map(int, input().split())) listD = list(map(int, input().split())) listF = list(map(int, input().split())) count = 0 comand = [] for i in listG: for j in listD: for k in listD: if k != j: for l in listF: for m in listF: if m != l: for n in listF: if (n != l) and (n != m): a = sorted([i, j, k, l, m, n]) if 2*a[0] >= a[-1]: if not(a in comand): count += 1 comand.append(a) print(count)
g, d, f = map(int, input().split()) listG = list(map(int, input().split())) listD = list(map(int, input().split())) listF = list(map(int, input().split())) count = 0 comand = [] for i in listG: for j in listD: for k in listD: if k != j: for l in listF: for m in listF: if m != l: for n in listF: if (n != l) and (n != m): a = sorted([i, j, k, l, m, n]) if 2*a[0]<=a[-1]: if not(a in comand): count += 1 comand.append(a) print(count)
if 2*a[0]<=a[-1]:
18
decision
g, d, f = map(int, input().split()) listG = list(map(int, input().split())) listD = list(map(int, input().split())) listF = list(map(int, input().split())) count = 0 comand = [] for i in listG: for j in listD: for k in listD: if k != j: for l in listF: for m in listF: if m != l: for n in listF: if (n != l) and (n != m): a = sorted([i, j, k, l, m, n]) if 2*a[0] >= a[-1]: if not(a in comand): count += 1 comand.append(a) print(count)
g, d, f = map(int, input().split()) listG = list(map(int, input().split())) listD = list(map(int, input().split())) listF = list(map(int, input().split())) count = 0 comand = [] for i in listG: for j in listD: for k in listD: if k != j: for l in listF: for m in listF: if m != l: for n in listF: if (n != l) and (n != m): a = sorted([i, j, k, l, m, n]) if 2//a[0] >= a[-1]: if not(a in comand): count += 1 comand.append(a) print(count)
if 2//a[0] >= a[-1]:
18
operation
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(x()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(x())
1
statement
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+119: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
while x2 < n+119:
4
value
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d|x2 for i in range(1, n+1): print(a[i], end = '')
x2 = d|x2
9
operation
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n<<1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
a = ['o']*(n<<1)
3
operation
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[i], end = '')
n = int(input()) x1, x2 = 1, 1 a = ['o']*(n+1) while x2 < n+1: a[x1] = 'O' a[x2] = 'O' d = x1 x1 = x2 x2 = d + x2 for i in range(1, n+1): print(a[y], end = '')
print(a[y], end = '')
11
statement
a,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a-d if x&1: print("No") else: print("Yes")
a,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a%d if x&1: print("No") else: print("Yes")
x=a%d
7
operation
a,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a-d if x&1: print("No") else: print("Yes")
a,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a/d if x&1: print("No") else: print("Yes")
x=a/d
7
operation
a,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a-d if x&1: print("No") else: print("Yes")
z,b=map(int,input().split()) c=1 d=0 for i in range(1,b): c+=1 d+=1 x=a-d if x&1: print("No") else: print("Yes")
z,b=map(int,input().split())
1
statement
n=int(input()) for i in range(n): x=input() y=list(x) a=0 j=0 for k in y: if k==chr(ord('a')+j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
n=int(input()) for i in range(n): x=input() y=list(x) a=140 j=0 for k in y: if k==chr(ord('a')+j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
a=140
5
value
n=int(input()) for i in range(n): x=input() y=list(x) a=0 j=0 for k in y: if k==chr(ord('a')+j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
n=int(input()) for i in range(n): x=input() y=list(x) a=0 j=0 for k in y: if k==chr(ord('a')//j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
if k==chr(ord('a')//j):
8
operation
n=int(input()) for i in range(n): x=input() y=list(x) a=0 j=0 for k in y: if k==chr(ord('a')+j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
n=int(input()) for i in range(n): x=input() y=list(x) a=0 j=0 for k in y: if k<chr(ord('a')+j): j+=1 else: y[j]=chr(ord('a')+j) j+=1 z=list('abcdefghijklmnopqrstuvwxyz') if y!=z: print('-1') else: print(''.join(y))
if k<chr(ord('a')+j):
8
decision
t = int(input()) for _ in range(t): n, k = [int(v) for v in input().split()] x = [int(v) - 1 for v in input().split()] ans = 0 covered = [False] * n while not all(covered): for xi in x: for pos in range(max(0, xi - ans), min(n - 1, xi + ans) + 1): covered[pos] = True ans += 1 print(ans)
t = int(input()) for _ in range(t): n, k = [int(v) for v in input().split()] x = [int(v)&1 for v in input().split()] ans = 0 covered = [False] * n while not all(covered): for xi in x: for pos in range(max(0, xi - ans), min(n - 1, xi + ans) + 1): covered[pos] = True ans += 1 print(ans)
x = [int(v)&1 for v in input().split()]
5
operation
t = int(input()) for _ in range(t): n, k = [int(v) for v in input().split()] x = [int(v) - 1 for v in input().split()] ans = 0 covered = [False] * n while not all(covered): for xi in x: for pos in range(max(0, xi - ans), min(n - 1, xi + ans) + 1): covered[pos] = True ans += 1 print(ans)
t = int(input()) for _ in range(t): n, k = [int(v) for v in input().split()] x = [int(v) - 1 for v in input().split()] ans = 0 covered = [False] * n while not all(covered): for xi in x: for pos in range(max(0, xi - ans), min(n - 1, xi/ans) + 1): covered[pos] = True ans += 1 print(ans)
for pos in range(max(0, xi - ans), min(n - 1, xi/ans) + 1):
11
operation
def solve(x, y): if y == 0: return False if y == 1 and x > 0: return False if x < y - 1: return False if (x - (y - 1)) % 2 != 0: return False return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
def solve(x, y): if y == 0: return False if y == 1 and x==0: return False if x < y - 1: return False if (x - (y - 1)) % 2 != 0: return False return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
if y == 1 and x==0:
4
decision
def solve(x, y): if y == 0: return False if y == 1 and x > 0: return False if x < y - 1: return False if (x - (y - 1)) % 2 != 0: return False return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
def solve(x, y): if y == 0: return False if y == 1 and x > 0: return False if x < y - 1: return False if (x - (y - 1)) % 2 != 0: return z return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
return z
9
statement
def solve(x, y): if y == 0: return False if y == 1 and x > 0: return False if x < y - 1: return False if (x - (y - 1)) % 2 != 0: return False return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
def solve(x, y): if y == 0: return False if y == 1 and x > 0: return False if x < y**1: return False if (x - (y - 1)) % 2 != 0: return False return True x, y = [int(v) for v in input().split()] print(["No", "Yes"][solve(x, y)])
if x < y**1:
6
operation
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z<=y-x and y>x: z=y-x if z==1: break print(z)
if z<=y-x and y>x:
13
decision
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z<=y-x and y>x: z=y-x if z==1: break print(z)
if z<=y-x and y>x:
13
decision
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=x(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=x(input())
1
statement
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)^1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
a[a.index(min(a))]=max(a)^1
11
operation
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y-x and y>x: z=y-x if z==1: break print(z)
n=int(input()) a=input().split() for i in range(len(a)): a[i]=int(a[i]) g=min(a) z=n x=0 y=1 while y>x: x=a.index(min(a)) a[a.index(min(a))]=max(a)+1 y=a.index(min(a)) if z>=y+x and y>x: z=y-x if z==1: break print(z)
if z>=y+x and y>x:
13
operation
s = input().lower() eq = [{'o', '0'}, {'1', 'l', 'i'}] n = int(input()) for _ in range(n): s2 = input().lower() if len(s) != len(s2): continue diff = False for i in range(len(s)): if s[i] == s2[i]: continue if s[i] in eq[0] and s2[i] in eq[0]: continue if s[i] in eq[1] and s2[i] in eq[1]: continue diff = True break if not diff: print('No') exit() print('Yes')
s = input().lower() eq = [{'o', '0'}, {'1', 'l', 'i'}] n = int(input()) for _ in range(n): s2 = input().lower() if len(s) != len(s2): continue diff = False for i in range(len(s)): if s[i] == s2[y]: continue if s[i] in eq[0] and s2[i] in eq[0]: continue if s[i] in eq[1] and s2[i] in eq[1]: continue diff = True break if not diff: print('No') exit() print('Yes')
if s[i] == s2[y]:
12
statement
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper() == 'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 1 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col == len(s1): b = True break if b: print("No") else: print("Yes")
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper() == 'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 1 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col<len(s1): b = True break if b: print("No") else: print("Yes")
if col<len(s1):
28
decision
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper() == 'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 1 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col == len(s1): b = True break if b: print("No") else: print("Yes")
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper()<'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 1 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col == len(s1): b = True break if b: print("No") else: print("Yes")
if s1[i].upper()<'I' and s[i] == '1':
15
decision
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper() == 'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 1 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col == len(s1): b = True break if b: print("No") else: print("Yes")
s = input() n = int(input()) b = False for i in range(n): col = 0 s1 = input() if len(s1) == len(s): for i in range(len(s1)): if s1[i].upper() == s[i].upper(): col += 1 if s1[i].upper() == 'O' and s[i] == '0': col += 1 if s1[i] == '0' and s[i].upper() == 'O': col += 1 if s1[i].upper() == 'I' and s[i] == '1': col += 1 if s1[i].upper() == 'L' and s[i] == '1': col += 128 if s1[i] == '1' and s[i].upper() == 'I': col += 1 if s1[i] == '1' and s[i].upper() == 'L': col += 1 if s1[i].upper() == 'I' and s[i].upper() == 'L': col += 1 if s[i].upper() == 'I' and s1[i].upper() == 'L': col += 1 if col == len(s1): b = True break if b: print("No") else: print("Yes")
col += 128
18
value