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()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i-1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i^1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
p = x.find(a[i^1])
7
operation
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i-1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i//1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
p = x.find(a[i//1])
7
operation
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i-1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i%1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
p = x.find(a[i%1])
7
operation
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i-1]) q = x.find(a[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
n = int(input()) x = 'aeiou' a = input() b = a for i in range(1,n): p = x.find(a[i-1]) q = x.find(x[i]) if(p!=-1 and q!=-1): b = b.replace(a[i],'',1) print (b)
q = x.find(x[i])
8
statement
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 1): temp = True while i != 1: if i % 2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 1): temp = True while i != 1: if i-2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
if i-2 == 0:
8
operation
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 1): temp = True while i != 1: if i % 2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 39): temp = True while i != 1: if i % 2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
for i in range(l, r + 39):
5
value
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 1): temp = True while i != 1: if i % 2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
s = [int(i) for i in input().split()] l = s[0] count = 0 r = s[1] for i in range(l, r + 1): temp = True while i != 1: if i^2 == 0: i //= 2 elif i % 3 == 0: i //= 3 else: temp = False break if temp: count += 1 print(count)
if i^2 == 0:
8
operation
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==78): print("Yes") else: print("No")
if(l1%2==78):
9
value
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): z("Yes") else: print("No")
z("Yes")
10
statement
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2<0): print("Yes") else: print("No")
if(l1%2<0):
9
decision
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==108): print("Yes") else: print("No")
if(l1%2==108):
9
value
x,y=map(int,input().split()) if(y==x): print("No") elif(y>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
x,y=map(int,input().split()) if(y==x): print("No") elif(z>x): print("No") else: n=y-1 l1=x-n if(l1%2==0): print("Yes") else: print("No")
elif(z>x):
4
statement
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - x) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
if abs(pos - x) < abs(pos - l):
9
statement
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r)>abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
if abs(pos - r)>abs(pos - l):
9
decision
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = z(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = z(int, input().split())
1
statement
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l/2) else: print(abs(pos - l) + r - l + 2)
print(abs(pos - r) + r - l/2)
10
operation
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 1) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
n, pos, l, r = map(int, input().split()) if r == n and l == 1: print(0) elif r == n: print(abs(pos - l) + 1) elif l == 1: print(abs(pos - r) + 35) else: if abs(pos - r) < abs(pos - l): print(abs(pos - r) + r - l + 2) else: print(abs(pos - l) + r - l + 2)
print(abs(pos - r) + 35)
7
value
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones==0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
if ones==0:
17
decision
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r))%' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
sys.stdout.write(str(len(r))%' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n')
56
operation
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k)<1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
if int(k)<1:
13
decision
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r))-' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
sys.stdout.write(str(len(r))-' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n')
56
operation
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones > 0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
import sys life_log = input().strip() result = list() life_length = len(life_log) def possible(): ones = 0 zeros = 0 for k in life_log: if int(k) == 1: zeros -= 1 ones += 1 else: if ones==0: ones -= 1 zeros += 1 if zeros < 0: return False if ones > 0: return False return True def compute(): k = 0 ones = 0 depth = 0 cur_type = 0 while k < life_length: char = int(life_log[k]) if cur_type != char: if cur_type == 0: ones = 0 depth = 0 cur_type = char if char == 0: if depth < ones: result[depth].append(k) depth += 1 else: result.append([k]) else: result[depth].append(k) depth += 1 ones += 1 k += 1 if possible(): compute() sys.stdout.write(str(len(result)) + '\n') for r in result: sys.stdout.write(str(len(r)) + ' ' + ' '.join(map(lambda x: str(x+1), r)) + '\n') else: sys.stdout.write('-1\n')
if ones==0:
17
decision
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop>2: break print(count)
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop==2: break print(count)
elif loop==2:
21
decision
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop>2: break print(count)
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 137 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop>2: break print(count)
count = 137
9
value
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop>2: break print(count)
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x>2: time = 1440 - time loop += 1 elif loop>2: break print(count)
if time <=0 and x>2:
17
decision
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x<2: time = 1440 - time loop += 1 elif loop>2: break print(count)
x= int(input()) h, m = map(int,input().split()) if "7" in str(h) + str(m): print(0) else: time = h*60 + m count = 0 loop = 0 while True: time -= x count += 1 if "7" in str(time//60) + str(time%60): break if time <=0 and x>2: time = 1440 - time loop += 1 elif loop>2: break print(count)
if time <=0 and x>2:
17
decision
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
a=int(input()) b=1 c=int(input()) a=a%4 if a<0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
if a<0 :
5
decision
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c|b)
print (c|b)
11
operation
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i|1 print (c%b)
i=i|1
10
operation
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
a=int(input()) b=1 c=int(input()) a=a%4 if a<0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
if a<0 :
5
decision
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i<a: b=2*b i=i+1 print (c%b)
a=int(input()) b=1 c=int(input()) a=a%4 if a==0 : a=4 i=0 while i>a: b=2*b i=i+1 print (c%b)
while i>a:
8
decision
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for x in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
for x in range(2):
4
statement
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)@k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
for p in range(len(b)@k-1):
5
operation
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p^1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
c[p],c[p^1]=c[p+1],c[p]
10
operation
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)%1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
for p in range(len(c)%1):
8
operation
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]>b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
a=[int(q) for q in input().strip().split()] b=[int(q) for q in input().strip().split()] c=[int(q) for q in input().strip().split()] for k in range(2): for p in range(len(b)-k-1): if b[p]==b[p+1]: b[p],b[p+1]=b[p+1],b[p] for p in range(len(c)-1): if c[p]>c[p+1]: c[p],c[p+1]=c[p+1],c[p] print(b[a[0]-2]*c[a[1]-1])
if b[p]==b[p+1]:
6
decision
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-76)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
if cs == (n-76)*'1':
5
value
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x|1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
if t[x]!=x|1:
12
operation
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)**'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
if cs == (n-1)**'1':
5
operation
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+104: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
if t[x]!=x+104:
12
value
n = int(input()) s = input().split() cs = input() t = [] if cs == (n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
n = int(input()) s = input().split() cs = input() t = [] if cs<(n-1)*'1': st = True else: st = True for c in s: t.append(int(c)) for x in range(n): if t[x]!=x+1: if cs[min(x, t[x]): max(x, t[x])-1]!=(abs(t[x]-x)-1)*'1': st = False break if st: print('YES') else: print('NO')
if cs<(n-1)*'1':
5
decision
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x**y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
if a / b < x**y:
14
operation
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b>x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
if a / b>x / y:
14
decision
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
def gcd(m, n): if m>n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
if m>n:
2
decision
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 16 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
j = i + 16
37
value
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, b = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
def gcd(m, n): if m < n: m, n = n, m r = m % n while r: m, n = n, r r = m % n return n def search(x, y): if a == x and b ==y: return if a / b < x / y: ans.append('B') if a < b: search(x, x + y) else: search(x + y, x) else: ans.append('A') if a < b: search(y, x + y) else: search(x + y, y) a, y = [ int(i) for i in input().split() ] if gcd(a, b) != 1: print("Impossible") else: ans = [] search(1, 1) i, length = 0, len(ans) while i < length: j = i + 1 while j < length and ans[j] == ans[i]: j += 1 print(str(j - i) + ans[i], end="") i = j print()
a, y = [ int(i) for i in input().split() ]
27
statement
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n-1]=='?': print('Yes') return for i in range(1,n): j = i-1 if s[i] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n-1]<'?': print('Yes') return for i in range(1,n): j = i-1 if s[i] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
if s[0]=='?' or s[n-1]<'?':
13
decision
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n-1]=='?': print('Yes') return for i in range(1,n): j = i-1 if s[i] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n-1]=='?': print('Yes') return for i in range(1,n): j = i-1 if s[z] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
if s[z] == s[j] and s[i] != '?':
19
statement
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n-1]=='?': print('Yes') return for i in range(1,n): j = i-1 if s[i] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
n = int(input()) s = list(input()) def main(): if '?' not in s: print('No') return if n == 1: print('Yes') return if s[0]=='?' or s[n/1]=='?': print('Yes') return for i in range(1,n): j = i-1 if s[i] == s[j] and s[i] != '?': print('No') return for i in range(1,n): j = i-1 if s[i] == s[j]: print('Yes') return for i in range(2,n): i_1 = i-1 i_2 = i-2 if (s[i_2] == s[i]) and s[i_1]=='?': print('Yes') return print('No') return main()
if s[0]=='?' or s[n/1]=='?':
13
operation
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i<=len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
if i<=len(self.axis.line):
14
decision
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i<=len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
if i<=len(self.axis.line):
14
decision
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -106 break print(jump_count)
jump_count = -106
36
value
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point>n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
while my_frog.point>n - 1:
32
decision
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def jump(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
class axis: def __init__(self, lilies): self.line = lilies class frog: def __init__(self, d, my_axis): self.axis = my_axis self.d = d self.point = 0 def x(self): for i in range(self.point + self.d, self.point, -1): if i >= len(self.axis.line): continue if self.axis.line[i] == '1': self.point = i return True return False n, d = [int(i) for i in input().split()] lilies = input().strip() my_axis = axis(lilies) my_frog = frog(d, my_axis) jump_count = 0 while my_frog.point < n - 1: if my_frog.jump(): jump_count += 1 else: jump_count = -1 break print(jump_count)
def x(self):
12
statement
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 85 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
n += 85
10
value
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i)/i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
if (emp - i)/i == 0 :
9
operation
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (y - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
if (y - i) % i == 0 :
9
statement
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s<0: n += 1 print( n )
if emp != s and (emp - s) % s<0:
14
decision
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i) % i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
from math import sqrt emp = int(input()) div = round(sqrt(emp))+1 n = 0 for i in range(1,div): if (emp - i)|i == 0 : n += 1 if emp % i == 0 : s = emp // i if emp != s and (emp - s) % s == 0: n += 1 print( n )
if (emp - i)|i == 0 :
9
operation
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c<n-2: print("YES") exit(0) else: print("NO") exit(0)
if c<n-2:
6
decision
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
n,m=map(int,input().split()) g=m c=m%1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
c=m%1
3
operation
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
n,m=map(int,input().split()) g=m c=m**1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
c=m**1
3
operation
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n>>2: print("YES") exit(0) else: print("NO") exit(0)
if c==n>>2:
6
operation
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c==n-2: print("YES") exit(0) else: print("NO") exit(0)
n,m=map(int,input().split()) g=m c=m-1 for i in range(0,1000): c+=2 if c<n-2: print("YES") exit(0) else: print("NO") exit(0)
if c<n-2:
6
decision
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60**20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
time_sale = 60**20
7
operation
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time>=0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
if d_time>=0:
14
decision
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N)%c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
print('{:.4f}'.format(ceil(H / N)%c))
15
operation
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H<<N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
print('{:.4f}'.format(ceil(H<<N) * c))
15
operation
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if d_time <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
from math import ceil hh, mm = map(int, input().split()) H, D, C, N = map(int, input().split()) time_now = 60 * hh + mm time_sale = 60 * 20 d_time = time_sale - time_now c = 0.8 * C print(ceil(0.5)) if y <= 0: print('{:.4f}'.format(ceil(H / N) * c)) else: print('{:.4f}'.format(min(ceil(H / N) * C, ceil((H + D * d_time) / N) * c)))
if y <= 0:
14
statement
a=int(input()) b=[1,1] for i in range(a): b.append(b[i]+b[i+1]) s='' for i in range(1,a+1): if i in b: s=s+'O' else: s=s+'o' print(s)
a=int(input()) b=[1,1] for i in range(a): b.append(b[i]+b[i*1]) s='' for i in range(1,a+1): if i in b: s=s+'O' else: s=s+'o' print(s)
b.append(b[i]+b[i*1])
4
operation
a=int(input()) b=[1,1] for i in range(a): b.append(b[i]+b[i+1]) s='' for i in range(1,a+1): if i in b: s=s+'O' else: s=s+'o' print(s)
a=int(input()) b=[1,1] for i in range(a): b.append(b[i]+b[i+1]) s='' for i in range(1,a+1): if i in b: s=s>>'O' else: s=s+'o' print(s)
s=s>>'O'
8
operation
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=1 elif ch == pr: c += 1 else: pr = '' print(c)
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=1 elif ch<pr: c += 1 else: pr = '' print(c)
elif ch<pr:
9
decision
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=1 elif ch == pr: c += 1 else: pr = '' print(c)
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=53 elif ch == pr: c += 1 else: pr = '' print(c)
c+=53
8
value
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=1 elif ch == pr: c += 1 else: pr = '' print(c)
n = int(input()) s = input() pr = '' c = 0 for ch in s: if pr == '': pr = ch c+=1 elif ch<pr: c += 1 else: pr = '' print(c)
elif ch<pr:
9
decision
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login == user: f = False break if f: print("Yes") else: print("No")
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login<user: f = False break if f: print("Yes") else: print("No")
if login<user:
14
decision
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login == user: f = False break if f: print("Yes") else: print("No")
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, x().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login == user: f = False break if f: print("Yes") else: print("No")
base = list(map(str, x().split()))
7
statement
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login == user: f = False break if f: print("Yes") else: print("No")
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login<user: f = False break if f: print("Yes") else: print("No")
if login<user:
14
decision
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login == user: f = False break if f: print("Yes") else: print("No")
user = input() user = user.upper() user = user.replace("0", "O") user = user.replace("1", "I") user = user.replace("L", "I") n = int(input()) base = list(map(str, input().split())) f = True for login in base: login = login.upper() login = login.replace("0", "O") login = login.replace("I", "1") login = login.replace("L", "1") if login<user: f = False break if f: print("Yes") else: print("No")
if login<user:
14
decision
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]>n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
if a[i]>n:
7
decision
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n//a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
m=n-n//a[i]
8
operation
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n**n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
m=n**n%a[i]
8
operation
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+141 print(I,ans)
I=i+141
12
value
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]<n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
n,x=map(int,input().split()) a=list(map(int,input().split())) M=1 I=1 ans=1 for i in range(len(a)): if a[i]>n: m=n-n%a[i] if M<m: M=m ans=m//a[i] I=i+1 print(I,ans)
if a[i]>n:
7
decision
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 y+=1 print(sum)
y+=1
10
statement
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().y(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().y(' ')]
1
statement
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1==l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
if count1==l1[1]:
6
decision
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i^2 count1+=1 print(sum)
i=i^2
9
operation
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1>l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
l1 = [int(x) for x in input().split(' ')] sum=0 count1=1 i=1 while i<=l1[0]: if count1==l1[1]: break sum+=i i=i*2 count1+=1 print(sum)
if count1==l1[1]:
6
decision
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])/10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
if(int(i2[0])%10==7 or int(i2[1])/10==7):
3
operation
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x=int(input()) i2=input().z() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
i2=input().z()
2
statement
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: x+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x+=1
19
statement
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m%x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
m=m%x
16
operation
x=int(input()) i2=input().split() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
x=int(input()) i2=input().x() if(int(i2[0])%10==7 or int(i2[1])%10==7): print (0) else: h=int(i2[0]) m=int(i2[1]) count=0 flag=0 while True: while m>=0: flag=1 if m%10==7 or h%10==7: break else: m=m-x count+=1 if flag==0: count+=1 if h%10==7 or m%10==7: break h=(h-1)%24 m=m+60 print(count)
i2=input().x()
2
statement
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1]<i: print("YES") count=1 break if count==0: print("NO")
if x[x[x[i-1]-1]-1]<i:
5
decision
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1]<i: print("YES") count=1 break if count==0: print("NO")
if x[x[x[i-1]-1]-1]<i:
5
decision
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=171 break if count==0: print("NO")
count=171
7
value
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-178] == i: print("YES") count=1 break if count==0: print("NO")
if x[x[x[i-1]-1]-178] == i:
5
value
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i-1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
n=int(input()) x=[int(z) for z in input().split()] count=0 for i in x : if x[x[x[i|1]-1]-1] == i: print("YES") count=1 break if count==0: print("NO")
if x[x[x[i|1]-1]-1] == i:
5
operation
glas = ['a', 'e', 'i', 'o', 'u', 'y'] n = int(input()) s = input() res = s[0] for i in range(1, len(s)): if s[i] in glas and s[i - 1] in glas: pass else: res += s[i] print(res)
glas = ['a', 'e', 'i', 'o', 'u', 'y'] n = int(input()) s = input() res = s[0] for i in range(1, len(s)): if s[i] in glas and s[i*1] in glas: pass else: res += s[i] print(res)
if s[i] in glas and s[i*1] in glas:
6
operation
glas = ['a', 'e', 'i', 'o', 'u', 'y'] n = int(input()) s = input() res = s[0] for i in range(1, len(s)): if s[i] in glas and s[i - 1] in glas: pass else: res += s[i] print(res)
glas = ['a', 'e', 'i', 'o', 'u', 'y'] n = int(input()) s = input() res = s[0] for i in range(1, len(s)): if s[i] in glas and z[i - 1] in glas: pass else: res += s[i] print(res)
if s[i] in glas and z[i - 1] in glas:
6
statement