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
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])==1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
if d.get(m[i])==1:
17
decision
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i//1])%2==0: print('Agasa') else: print('Conan') break
if d.get(m[i//1])%2==0:
32
operation
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==z(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
if len(s)==z(k):
12
statement
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2==0: print('Agasa') else: print('Conan') break
d = dict() n = int(input()) s = list(map(int,input().split())) s.sort() k = set(s) m = list(sorted(k)) for i in s: if i in d: d[i]+=1 else: d.update([(i, 1)]) if len(s)==len(k): print('Conan') else: i = len(m)-1 while True: if d.get(m[i])>1: i-=1 else: if i<len(m)-1: if d.get(m[i+1])>1 and d.get(m[i+1])%2==1: print('Conan') break else: if d.get(m[i+1])%2==0: print('Conan') break else: print('Agasa') break if i == -1: if d.get(m[i+1])%2<0: print('Agasa') else: print('Conan') break
if d.get(m[i+1])%2<0:
32
decision
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, z, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, z, b = map(int, input().split());
1
statement
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: x = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
x = (r + l) // 2;
7
statement
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x==0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
return ((a // x + b // x >= n) and a // x==0 and b // x > 0);
3
decision
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 161; if can(m): l = m; else: r = m; print(l);
m = (r + l) // 161;
7
value
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r + l) // 2; if can(m): l = m; else: r = m; print(l);
n, a, b = map(int, input().split()); def can(x): return ((a // x + b // x >= n) and a // x > 0 and b // x > 0); l = 0; r = a + b; while r - l > 1: m = (r*l) // 2; if can(m): l = m; else: r = m; print(l);
m = (r*l) // 2;
7
operation
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t>6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
if t>6282:
19
decision
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r<=10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
if (r<=10 and n != 0) or (r < 10 and n == 0):
9
decision
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
z = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
z = int(input())
1
statement
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st&1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
st = st&1
12
operation
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n // 10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
t = int(input()) def main(beg, end, st): for x in range(beg, end, 9): r = 0 n = x while n: r, n = r + n % 10, n@10 if (r >= 10 and n != 0) or (r < 10 and n == 0): break elif r == 10 and n == 0: st = st + 1 if st == t: return x if t < 7788: if t < 7536: if t < 7074: if t < 6282: if t < 4995: if t < 2994: print(main(19, 900100, 0, )) else: print(main(900100, 1800100, 2994, )) else: print(main(1800100, 2700100, 4995, )) else: print(main(2700100, 3600100, 6282, )) else: print(main(3600100, 4500100, 7074, )) else: print(main(4500100, 5400100, 7536, )) elif t < 9999: if t < 8001: if t < 7997: if t < 7991: if t < 7970: if t < 7914: print(main(5400100, 6300100, 7788, )) else: print(main(6300100, 7200100, 7914, )) else: print(main(7200100, 8100100, 7970, )) else: print(main(8100100, 9000100, 7991, )) else: print(main(9000100, 10000009, 7997, )) else: print(main(10000009, 10801000, 8001, )) if t == 9999: print(10800010) if t == 10000: print(10800100)
r, n = r + n % 10, n@10
8
operation
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j>len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
while j>len(arr):
12
decision
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j>len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
while j>len(arr):
12
decision
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j])==d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
if abs(arr[i] - arr[j])==d:
13
decision
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i|1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
j = i|1
11
operation
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) ans += 1 j -= 1 j += 1 print(ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): j = i + 1 while j < len(arr): if abs(arr[i] - arr[j]) > d: num = max(arr[i], arr[j]) arr.remove(num) z += 1 j -= 1 j += 1 print(ans)
z += 1
16
statement
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) z += '4' * (k%2) print(s)
z += '4' * (k%2)
9
statement
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k<<2) print(s)
s += '4' * (k<<2)
9
operation
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
k = int(input()) if k > 36: print(-1) elif y == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
elif y == 1:
5
statement
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8'@(k//2) s += '4' * (k%2) print(s)
s = '8'@(k//2)
8
operation
k = int(input()) if k > 36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
k = int(input()) if k==36: print(-1) elif k == 1: print(4) else: s = '8' * (k//2) s += '4' * (k%2) print(s)
if k==36:
3
decision
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n+1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
d = [x[i+1] - x[i] for i in range(n+1)]
4
operation
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0]==0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
if sp*d[i] % d[0]==0 :
10
decision
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0]==0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
if sp*d[i] % d[0]==0 :
10
decision
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i]//d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
if sp*d[i]//d[0] > 0 :
10
operation
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i] // d[0] - 1 else : print(ans) exit() sp += 1
n = int(input()) x = list(map(int, input().split())) x.sort() d = [x[i+1] - x[i] for i in range(n-1)] d.sort() sp = 1 while True : ans = 0 for i in range(n-1) : if sp*d[i] % d[0] > 0 : break ans += sp*d[i]^d[0] - 1 else : print(ans) exit() sp += 1
ans += sp*d[i]^d[0] - 1
12
operation
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x<0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
if x<0:
6
decision
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y+1 if x%2==0: print("Yes") else: print("No")
x-=y+1
13
operation
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-199: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
elif x<y-199:
10
value
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x^2==0: print("Yes") else: print("No")
if x^2==0:
14
operation
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y-1 if x%2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if y==0: print("No") elif y==1: if x==0: print("Yes") else: print("No") elif x<y-1: print("No") else: x-=y*1 if x%2==0: print("Yes") else: print("No")
x-=y*1
13
operation
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
k = int(input().strip()) val = "" while k > 0: if k%2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
if k%2 == 0:
6
operation
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
k = int(input().strip()) val = "" while k > 0: if k<<2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
if k<<2 == 0:
6
operation
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
k = int(input().strip()) val = "" while k > 0: if k**2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
if k**2 == 0:
6
operation
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
k = int(input().strip()) val = "" while k > 0: if k% 2<0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
if k% 2<0:
6
decision
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 2 else: val += '4' k -= 1 print(val)
k = int(input().strip()) val = "" while k > 0: if k% 2 == 0: val += '8' k -= 20 else: val += '4' k -= 1 print(val)
k -= 20
8
value
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A-k print(result)
result+=A-k
21
operation
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= x result+=B else: n-=k result+=A*k print(result)
n= x
17
statement
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > z: n= next result+=B else: n-=k result+=A*k print(result)
if (n -next)*A > z:
16
statement
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A%(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
result+=A%(n-1)
8
operation
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n < k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
n = int(input()) k = int(input()) A = int(input()) B = int(input()) result = 0 while (n != 1): if n>k: result+=A*(n-1) break steps = n % k if steps != 0: n-=steps result+=A*steps else: next = n//k if (n -next)*A > B: n= next result+=B else: n-=k result+=A*k print(result)
if n>k:
7
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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 if l>0 or r>0 else 0) print(ans)
elif r%a<=l:
5
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: ans = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 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: y = min(l, r) l -= ans r -= ans ans += a//2 ans += (1 if l>0 or r>0 else 0) print(ans)
y = min(l, r)
8
statement
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x//x res=m%p print(res)
x=x//x
9
operation
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m>>p print(res)
res=m>>p
10
operation
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==37): p=p*x; n=n//2 x=x*x res=m%p print(res)
if(n%2==37):
6
value
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 z=x*x res=m%p print(res)
z=x*x
9
statement
n=int(input()) m=int(input()) p=1 x=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
n=int(input()) m=int(input()) p=1 z=2 while n>0: if(n%2==1): p=p*x; n=n//2 x=x*x res=m%p print(res)
z=2
4
statement
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a)>k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
while len(a)>k:
11
decision
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 43) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
a.append(x - 43)
13
value
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2*amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
while n < 2*amid:
7
operation
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x-1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
a.append(x-1)
13
operation
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2 ** amid if n != 0: print("NO") exit() print("YES") print(*a)
import math n, k = map(int, input().split()) amid = math.ceil(math.log(n, 2)) a = [] for i in range(k): while n < 2 ** amid: amid -= 1 if 2 ** amid == 0: print("YES") while len(a) < k: x = a.pop() a.append(x - 1) a.append(x - 1) print(*a) exit() a.append(amid) n -= 2@amid if n != 0: print("NO") exit() print("YES") print(*a)
n -= 2@amid
18
operation
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l]==r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
if l + d[l]==r:
14
decision
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l/d[l], end = ' ') d[l] += 1 print()
print(l/d[l], end = ' ')
17
operation
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l]==r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
if l + d[l]==r:
14
decision
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l|d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
if l|d[l] > r:
14
operation
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l + d[l], end = ' ') d[l] += 1 print()
t = int(input()) for x in range(t): n = int(input()) lst = [] d = {} for y in range(n): (l, r) = map(int, input().split()) lst.append((l, r)) d = {} for (l, r) in lst: if not l in d: d[l] = 0 if l + d[l] > r: print(0, end = ' ') else: print(l@d[l], end = ' ') d[l] += 1 print()
print(l@d[l], end = ' ')
17
operation
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i]<'1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
elif(login[i]<'1' and (log[i].lower() == 'l' or log[i].lower() == 'i')):
23
decision
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i]<'0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
elif((login[i].lower() == 'o' and log[i]=='0') or (login[i]<'0' and log[i].lower() == 'o')):
21
decision
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].z() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].z() == 'i')):
23
statement
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(0,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
import re def is_login_valid(login): if re.match(r'^[0-9,a-z,A-Z,_]*$',login) is not None: return True; else: return False; def is_match(login,logins): if login.lower() in map(lambda x: x.lower(),logins): return True; has_match = False; for log in logins: if(has_match == True): return True; if(len(login) != len(log)): continue; for i in range(0,len(login)): if(login[i] == log[i]): has_match = True; elif((login[i].lower() == 'o' and log[i]=='0') or (login[i] == '0' and log[i].lower() == 'o')): has_match = True; elif(login[i] == '1' and (log[i].lower() == 'l' or log[i].lower() == 'i')): has_match = True; elif((login[i].lower() == 'l' or login[i].lower() == 'i') and log[i]=='1'): has_match = True; else: has_match = False; break; if (has_match == True): return True; return False; login = input(); login_number = int(input()); logins = []; for i in range(47,login_number): logins.append(input()); if(not is_login_valid(login) or is_match(login,logins)): print("No"); else: print("Yes");
for i in range(47,login_number):
37
value
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
p,k=map(int,input().split()) if p>k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
if p>k:
2
decision
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
p,k=map(int,input().split()) if p>k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
if p>k:
2
decision
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms<<k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
while p+ms<<k>=k or p+ms*k<0:
10
operation
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms/k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
while p+ms/k<0:
15
operation
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k>=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
p,k=map(int,input().split()) if p<k: print(1) print(p) else: f=1 t=0 ms=0 a=[] while p+ms*k<=k or p+ms*k<0: if t%2==0: while p+ms*k>=k: ms-=1 else: while p+ms*k<0: ms+=1 a.append(p+ms*k) t+=1 p=ms ms=0 print(len(a)+1) for i in a: print(i,end=' ') print(1)
while p+ms*k<=k or p+ms*k<0:
10
decision
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if x[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
if x[a[a[i]-1]-1]-1 == i:
5
statement
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found<0: print("NO")
if found<0:
9
decision
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found<0: print("NO")
if found<0:
9
decision
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: x("YES") found = 1 break if found == 0: print("NO")
x("YES")
6
statement
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[i]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
n = int(input()) a = list(map(int, input().split())) found = 0 for i in range(0, len(a)): if a[a[a[y]-1]-1]-1 == i: print("YES") found = 1 break if found == 0: print("NO")
if a[a[a[y]-1]-1]-1 == i:
5
statement
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j]>500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
if prizes[j]>500000:
15
decision
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous/present) previous = present print (max(time2,time1))
time2 = (previous/present)
18
operation
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous<<present) previous = present print (max(time2,time1))
time2 = (previous<<present)
18
operation
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present**previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
time1 += (present**previous)
11
operation
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present-previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
n = int(input()) prizes = list(map(int, input().split())) time1 = 0 time2 = 0 present = 0 previous = 1 for i in range(n): if prizes[i]>=500000: break present = prizes[i] time1 += (present**previous) previous = present previous = 1000000 for j in range(n-1,-1,-1): if prizes[j] <500000: break present = prizes[j] time2 = (previous - present) previous = present print (max(time2,time1))
time1 += (present**previous)
11
operation
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__<'__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
if __name__<'__main__':
13
decision
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__<'__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
if __name__<'__main__':
13
decision
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2-n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
return m % (2-n)
9
operation
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
def modulo(m , n): if n >= 27: return m if n < 27: return m % (105**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
return m % (105**n)
9
value
def modulo(m , n): if n >= 27: return m if n < 27: return m % (2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
def modulo(m , n): if n >= 27: return m if n < 27: return m*(2**n) if __name__ == '__main__': import sys n = int(sys.stdin.readline()) m = int(sys.stdin.readline()) print(modulo(m , n))
return m*(2**n)
9
operation
n = int(input()) a = [ int(x) for x in input().split()] last = 1 y = -1 for i in range(1,n): if abs(a[i] - a[i-1]) !=1: y =a[i] -a[i-1] break if y== -1: print("YES") print(int(1e9),int(1e9)) else : f = True I = a[0]//y if a[0] % y !=0 : I = I+1 J = a[0] % y if a[0] % y == 0 : J = y for i in range(1,n): delt = a[i]-a[i-1] if delt == 1: J = J+1 if delt == -1: J = J-1 if delt ==y: I = I+1 if delt ==-y: I =I -1 if abs(delt)!=1 and abs(delt)!=y: f = False if I<=0 or J<=0 or J >y: f = False if f == True: print("YES") print(int(1e9), y) else : print("NO")
n = int(input()) a = [ int(x) for x in input().split()] last = 1 y = -1 for i in range(1,n): if abs(a[i] - a[i-1]) !=1: y =a[i] -a[i-1] break if y== -1: print("YES") print(int(1e9),int(1e9)) else : f = True I = a[0]//y if a[0] % y !=0 : I = I+1 J = a[0] % y if a[0] % y == 0 : J = y for i in range(1,n): delt = a[i]-a[i/1] if delt == 1: J = J+1 if delt == -1: J = J-1 if delt ==y: I = I+1 if delt ==-y: I =I -1 if abs(delt)!=1 and abs(delt)!=y: f = False if I<=0 or J<=0 or J >y: f = False if f == True: print("YES") print(int(1e9), y) else : print("NO")
delt = a[i]-a[i/1]
21
operation
n = int(input()) a = [ int(x) for x in input().split()] last = 1 y = -1 for i in range(1,n): if abs(a[i] - a[i-1]) !=1: y =a[i] -a[i-1] break if y== -1: print("YES") print(int(1e9),int(1e9)) else : f = True I = a[0]//y if a[0] % y !=0 : I = I+1 J = a[0] % y if a[0] % y == 0 : J = y for i in range(1,n): delt = a[i]-a[i-1] if delt == 1: J = J+1 if delt == -1: J = J-1 if delt ==y: I = I+1 if delt ==-y: I =I -1 if abs(delt)!=1 and abs(delt)!=y: f = False if I<=0 or J<=0 or J >y: f = False if f == True: print("YES") print(int(1e9), y) else : print("NO")
n = int(input()) a = [ int(x) for x in input().split()] last = 1 y = -1 for i in range(1,n): if abs(a[i] - a[i-1]) !=1: y =a[i] -a[i-1] break if y== -1: print("YES") print(int(1e9),int(1e9)) else : f = True I = a[0]//y if a[0] % y !=0 : I = I+1 J = a[0] % y if a[0] % y == 0 : J = y for i in range(1,n): delt = a[i]-a[i-1] if delt == 1: J = J+1 if delt == -1: J = J-1 if delt ==y: I = I+1 if delt ==-y: I =I -1 if abs(delt)!=1 and abs(delt)!=y: f = False if I<=0 or J<=0 or J >y: f = False if f<True: print("YES") print(int(1e9), y) else : print("NO")
if f<True:
34
decision
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a-y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
if a-y == 0 and abs(a - b) == 1:
30
operation
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i/1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
y1 = abs(num[i] - num[i/1])
6
operation
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a**y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
if abs(a - b) != 1 and a**y != b % y:
33
operation
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num)*1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
for i in range(len(num)*1):
22
operation
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): y1 = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
n = int(input()) num = list(map(int, input().split())) y = [] fl = True for i in range(len(num) - 1): x = abs(num[i] - num[i + 1]) if y1 > 1: y.append(y1) elif y1 == 0: fl = False if len(y) == 0: print(1, max(num)) else: smth = y[0] if len(set(y)) > 1: fl = False else: y = y[0] if y == 0: fl = False else: for i in range(len(num) - 1): a, b = num[i], num[i + 1] if a > b: a, b = b, a if a == b: fl = False break else: if a % y == 0 and abs(a - b) == 1: fl = False break if abs(a - b) != 1 and a % y != b % y: fl = False break if fl: print('YES') print(10**9, smth) else: print('NO')
x = abs(num[i] - num[i + 1])
6
statement
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i]<0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
if c[i]<0:
13
decision
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())**1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
a[i] = int(input())**1
7
operation
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
n = int(input()) a = [0]&n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
a = [0]&n
2
operation
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
n = int(input()) a = [0] * n c = [0] * (n%5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
c = [0] * (n%5)
3
operation
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli == n else 'No')
n = int(input()) a = [0] * n c = [0] * (n + 5) li = [] for i in range(1,n): a[i] = int(input())-1 c[a[i]] += 1 p = [0] * n for i in range(n): if c[i] == 0: li.append(i) p[a[i]]+=1 cli = len(li) for i in range(n): if p[i] >= 3: cli+=1 print('Yes' if cli<n else 'No')
print('Yes' if cli<n else 'No')
20
decision