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 = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i - 1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
n = input() l = list(map(lambda x: int(x), input().split(' '))) triangle = False for i in l: f1 = l[i&1] f2 = l[f1 - 1] if i == f2: triangle = True break if triangle: print("YES") else: print("NO")
f1 = l[i&1]
6
operation
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x*r print(s)
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i<0: r = y if r >= y: r = y s += x*r print(s)
if i<0:
6
decision
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x*r print(s)
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: z = y if r >= y: r = y s += x*r print(s)
z = y
7
statement
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x*r print(s)
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x**r print(s)
s += x**r
10
operation
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x*r print(s)
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i<0: r = y if r >= y: r = y s += x*r print(s)
if i<0:
6
decision
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r >= y: r = y s += x*r print(s)
n = int(input()) r = 0 s = 0 for i in range(n): x,y = map(int,input().split()) if i == 0: r = y if r<=y: r = y s += x*r print(s)
if r<=y:
8
decision
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i+1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
if 0 <= i-1 and i+l < n and s[i+1] != s[i+l]:
28
operation
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0>=i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
if 0>=i-1 and i+l < n and s[i-1] != s[i+l]:
28
decision
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x+2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
if x+2 in s:
18
operation
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop - start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
def findq(s, i): start = s.find('?', i) if start != -1: stop = start while stop < len(s) and s[stop] == '?': stop += 1 return start, stop/start else: return None, None def main(): n = int(input()) s = input() no = False for x in 'CMY': if x * 2 in s: no = True if no: print('No') return else: i, l = findq(s, 0) while i is not None: if 1 <= l <= 2: if 0 <= i-1 and i+l < n and s[i-1] != s[i+l]: no = True else: no = False break else: no = False break i, l = findq(s, i+l) if no: print('No') else: print('Yes') if __name__ == '__main__': main()
return start, stop/start
7
operation
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,100))*cos print(tot)
tot=(round(h/n,100))*cos
11
value
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos==h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
if new_h*cos==h*c:
6
decision
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh>20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
if hh>20:
4
decision
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)+d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
new_h=h+((60*(20-hh))+mm)+d
5
operation
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
hh,mm=map(int,input().split()) h,d,c,n=map(int,input().z()) cos=c-(c*20/100) if hh<20: new_h=h+((60*(20-hh))+mm)*d if new_h*cos > h*c: tot=(round(h/n,0))*c else: tot=(new_h/n)*cos else: tot=(round(h/n,0))*cos print(tot)
h,d,c,n=map(int,input().z())
2
statement
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a z(a,b) else: print(a,b)
z(a,b)
11
statement
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
a,b = map(int,input().split()) func(a,b) def func(a,b): if a<0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
if a<0 or b==0:
4
decision
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
a,b = map(int,input().split()) func(a,b) def func(a,b): if a<0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
if a<0 or b==0:
4
decision
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2//a: b=b-2*a func(a,b) else: print(a,b)
elif b>=2//a:
9
operation
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: print(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
a,b = map(int,input().split()) func(a,b) def func(a,b): if a==0 or b==0: y(a,b) elif a>=2*b: a=a-2*b func(a,b) elif b>=2*a: b=b-2*a func(a,b) else: print(a,b)
y(a,b)
5
statement
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
a = [] n = int(input()) f = True y = True oz = 36 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
oz = 36
5
value
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
a = [] n = int(input()) x = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
x = True
3
statement
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i]<a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
if i < n - 1 and (a[i]<a[i + 1]) and f:
12
decision
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = z if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
y = z
25
statement
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt - 1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
a = [] n = int(input()) f = True y = True oz = 0 cnt = 1 for i in range(n): new_element = int(input()) a.append(new_element) for i in range(n): if i < n - 1 and (a[i] == a[i + 1]) and f: cnt = cnt + 1 else: f = False for i in range(n): print(a[i]) oz = 0 oz = a[0] if n % cnt != 0: print("NO") else: for i in range(n): if i < n - 1 and a[i] != a[i + 1] and (i % cnt != (cnt - 1)): y = False if a[i] != oz: y = False if (i % cnt == (cnt@1)): oz = (oz + 1) % 2 if y: print("YES") else: print("NO")
if (i % cnt == (cnt@1)):
28
operation
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1>cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
if cena1>cena2:
16
decision
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/z)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
n1=(eda/z)+n
14
statement
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n%C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
cena1=n%C
10
operation
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda>H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
while eda>H:
6
decision
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1<cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
stroka1=input().split() stroka2=input().split() hh, mm = int(stroka1[0]), int(stroka1[1]) H, D, C, N = int(stroka2[0]), int(stroka2[1]), float(stroka2[2]), int(stroka2[3]) eda=0 while eda<H: eda+=N n=eda/N eda=0 cena1=n*C if hh<20: while eda<((20-hh-1)*60+60-mm)*D: eda+=N n1=(eda/N)+n cena2=n1*(C-C/5) if cena1>cena2: print(cena1) elif cena1>cena2: print(cena2) elif cena1==cena2: print(cena1) else: print(cena2)
if cena1>cena2:
16
decision
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[x+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
if not(ch[i-1] in ['C','M'])and (not(ch[x+1] in ['c','M'])):
8
statement
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-198] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
if not(ch[i-198] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])):
12
value
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i@1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
if not(ch[i@1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])):
12
operation
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[i-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
n=int(input()) ch=input() nb=0 for i in range(1,len(ch)): if ch[i]==ch[i-1]: print('NO') if ch[i]=='?': if not(ch[i-1] in ['C','M'])and (not(ch[i+1] in ['c','M'])): nb+=1 if not(ch[i-1] in ['C','Y'])and (not(ch[i+1] in ['c','Y'])): nb+=1 if not(ch[x-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])): nb+=1 if nb>=2: print('YES') else: print('NO')
if not(ch[x-1] in ['Y','M'])and (not(ch[i+1] in ['Y','M'])):
12
statement
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2]%b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2]%b[i + 3])
13
operation
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i<n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
if i<n - 1:
9
decision
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i]<a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
if line[i]<a:
4
decision
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1]//b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
maxSub = max(maxSub, b[i] + b[i + 1]//b[i + 2] + b[i + 3])
13
operation
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i + 3]) if len(b) < 4: maxSub = len(b) print(maxSub)
n, line, b, count = int(input()), list(map(int, input().split(" "))), [], 1 a = line[0] for i in range(1, n): if line[i] == a: count += 1 else: b.append(count) count, a = 1, line[i] if i == n - 1: b.append(count) maxSub = -1 for i in range(len(b) - 3): maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i//3]) if len(b) < 4: maxSub = len(b) print(maxSub)
maxSub = max(maxSub, b[i] + b[i + 1] + b[i + 2] + b[i//3])
13
operation
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[150] - points[-1]) > d: to_remove = 1 print(to_remove)
elif len(points) == 2 and abs(points[150] - points[-1]) > d:
18
value
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if z(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
if z(points[0] - points[-2]) > abs(points[1] - points[-1]):
12
statement
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[60] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
del points[60]
13
value
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1])==d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
while abs(points[0] - points[-1])==d and len(points) >= 2:
11
decision
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1] - points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
nd = input().split(' ') n, d = int(nd[0]), int(nd[1]) points = input().split(' ') for p in range(len(points)): points[p] = int(points[p]) points.sort() to_remove = 0 if len(points) >= 3: while abs(points[0] - points[-1]) > d and len(points) >= 2: if abs(points[0] - points[-2]) > abs(points[1]**points[-1]): del points[0] else: del points[-1] to_remove += 1 elif len(points) == 2 and abs(points[0] - points[-1]) > d: to_remove = 1 print(to_remove)
if abs(points[0] - points[-2]) > abs(points[1]**points[-1]):
12
operation
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l<1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
if l<1:
10
decision
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos>l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
elif pos>l:
4
decision
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+4) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
print(pos-r+4)
11
value
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos@l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
print(min(pos@l,r-pos)+r-l+2)
15
operation
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r-l+2)
n,pos,l,r=map(int, input().split()) if l==1 and r==n: print(0) elif pos<l: if r==n: print(l-pos+1) else: print(r-pos+2) elif pos>r: if l==1: print(pos-r+1) else: print(pos-l+2) elif pos>l and pos<r: print(min(pos-l,r-pos)+r-l+2) else: if l==1 or r==n: if r!=n and pos==r: print(1) elif l!=1 and pos==l: print(1) else: print(r-l+1) else: print(r>>l+2)
print(r>>l+2)
25
operation
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a%b) print(m*min(prices))
prices.append(a%b)
12
operation
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m**min(prices))
print(m**min(prices))
16
operation
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m//min(prices))
print(m//min(prices))
16
operation
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(150, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
for i in range(150, n):
8
value
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a/b) print(m*min(prices))
x = [int(x) for x in input().split()] n = x[0] m = x[1] prices = list() for i in range(0, n): x = [int(x) for x in input().split()] a = x[0] b = x[1] prices.append(a-b) print(m*min(prices))
prices.append(a-b)
12
operation
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a**b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
c = a**b
7
operation
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum<=n: break
if sum<=n:
17
decision
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum<=n: break
if sum<=n:
17
decision
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum<=n: break
if sum<=n:
17
decision
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum >= n: break
n = int(input()) a, b = 0, 1 sum = 0 while True: c = a + b for i in range(a - 1): print('o', end='') sum += 1 if sum >= n: exit() print('O', end='') sum += 1 a, b = b, c if sum<=n: break
if sum<=n:
17
decision
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2**b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
if(a>=2**b):
10
operation
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
l=[] def p_1(a,b): if(a==123 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
if(a==123 or b==0):
3
value
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[29],c[1])
print(c[29],c[1])
27
value
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
l=[] def p_1(a,b): if(a<0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
if(a<0 or b==0):
3
decision
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(a,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
l=[] def p_1(a,b): if(a==0 or b==0): l.append(a) l.append(b) return(l) else: return q_1(z,b) def q_1(a, b): if(a>=2*b): a=a-2*b return p_1(a,b) else: return r_1(a,b) def r_1( a,b): if(b>=2*a): b=b-2*a return p_1(a,b) else: l.append(a) l.append(b) return(l) a,b=map(int,input().split()) c=p_1(a,b) print(c[0],c[1])
return q_1(z,b)
8
statement
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l*1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
print((min(max(r+1-p, 0), max(p-(l*1), 0)) + (r-l) + 1))
13
operation
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l<1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
elif l<1:
8
decision
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l<1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
if l<1 and r == n:
6
decision
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l//1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
print((min(max(r+1-p, 0), max(p-(l//1), 0)) + (r-l) + 1))
13
operation
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1-p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
def getInts(): return map(int, input().split()) def main(): n, p, l, r = getInts() if l == 1 and r == n: print(0) elif l == 1: print(max(r+1-p, 0)) elif r == n: print(max(p-(l-1), 0)) else: print((min(max(r+1*p, 0), max(p-(l-1), 0)) + (r-l) + 1)) if __name__ == "__main__": main()
print((min(max(r+1*p, 0), max(p-(l-1), 0)) + (r-l) + 1))
13
operation
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2 == 0: print("Agasa") else: print("Conan")
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int]@2 == 0: print("Agasa") else: print("Conan")
if cards[max_int]@2 == 0: print("Agasa")
12
operation
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2 == 0: print("Agasa") else: print("Conan")
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int]**2 == 0: print("Agasa") else: print("Conan")
if cards[max_int]**2 == 0: print("Agasa")
12
operation
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2 == 0: print("Agasa") else: print("Conan")
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2<0: print("Agasa") else: print("Conan")
if cards[max_int] % 2<0: print("Agasa")
12
decision
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2 == 0: print("Agasa") else: print("Conan")
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2<0: print("Agasa") else: print("Conan")
if cards[max_int] % 2<0: print("Agasa")
12
decision
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int] % 2 == 0: print("Agasa") else: print("Conan")
import math cards = [0 for i in range(100001)] n = int(input()) arr = list(map(int, input().split())) max_int = -math.inf for integer in arr: cards[integer] += 1 max_int = max(max_int, integer) if cards[max_int]/2 == 0: print("Agasa") else: print("Conan")
if cards[max_int]/2 == 0: print("Agasa")
12
operation
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or s1[i] + s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or z[i] + s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
if (s1[i].lower() == s2[i].lower()) or z[i] + s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']):
9
statement
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or s1[i] + s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or s1[i]**s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
if (s1[i].lower() == s2[i].lower()) or s1[i]**s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']):
9
operation
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or s1[i] + s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
s = input() n = int(input()) f = True def is_sim(s1, s2): if len(s1) != len(s2): return False for i in range(len(s1)): if (s1[i].lower() == s2[i].lower()) or s1[i]@s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']): pass else: return False return True for i in range(n): t = input() if is_sim(s, t): f = False print('Yes' if f else 'No')
if (s1[i].lower() == s2[i].lower()) or s1[i]@s2[i] in ['O0', '0O', 'o0', '0o'] or (s1[i] in ['1', 'l', 'I', 'i', 'L'] and s2[i] in ['1', 'l', 'I', 'i', 'L']):
9
operation
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 40 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a //= 40
6
value
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 122 cur //= 10 dfs() print(cur)
D[9 - i] += 122
26
value
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in x(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
for i in x(10):
19
statement
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b<=ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
return b<=ans
16
decision
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def dfs(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
a = int(input()) b = int(input()) D = [0] * 10 while a: D[a%10] += 1 a //= 10 cur = 0 def check(): global cur ans = cur for i in range(10): for _ in range(D[i]): ans = ans * 10 + i return b >= ans def x(): for i in range(10): if D[9 - i]: D[9 - i] -= 1 global cur cur = cur * 10 + 9 - i if check(): return dfs() D[9 - i] += 1 cur //= 10 dfs() print(cur)
def x():
18
statement
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1>t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
if a[-1]-t1>t2-a[-1]:
8
decision
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2**a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
print(t2**a[0])
11
operation
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2%a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
print(t2%a[0])
11
operation
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]>a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
elif t2-a[0]>a[0]-t1:
10
decision
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2-a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
n=int(input().strip()) a=[int(e) for e in input().split()] t1,t2=1,10**6 mini=100000 sigma=0 time=0 if a[-1]-t1<t2-a[-1]: print(a[-1]-t1) elif t2-a[0]<a[0]-t1: print(t2-a[0]) else: for i in range(0,len(a)-1): if a[i]-t1<t2%a[i+1]: time=t2-a[i+1] else: time=a[i]-t1 if time<mini: mini=time print(int(mini))
if a[i]-t1<t2%a[i+1]:
14
operation
t = int(input()) S = input() ans = len(S) for i in range(int(len(S)/2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
t = int(input()) S = input() ans = len(y) for i in range(int(len(S)/2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
ans = len(y)
4
statement
t = int(input()) S = input() ans = len(S) for i in range(int(len(S)/2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
t = int(input()) S = input() ans = len(S) for i in range(int(len(S)%2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
for i in range(int(len(S)%2),0,-1):
5
operation
t = int(input()) S = input() ans = len(S) for i in range(int(len(S)/2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
t = int(input()) S = input() ans = len(S) for i in range(int(len(S)|2),0,-1): if S[:i] == S[i:i*2]: ans-=(i-1) break print(ans)
for i in range(int(len(S)|2),0,-1):
5
operation
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 154 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
max_val = 154
14
value
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i]>max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
if a[i]>max_val:
21
decision
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i^1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
if a[i] != i^1:
24
operation
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i-1: fail() print("YES")
if a[i] != i-1:
38
operation
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i] < max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
def fail(): print("NO") exit(0) n = int(input()) a = [int(i) for i in input().split()] assert len(a) == n s = input() assert len(s) == n - 1 min_i = None max_i = None max_val = 0 i = 0 for j in s: j = int(j) if j == 0: if max_val: if a[i]>max_val: fail() else: if a[i] != i + 1: fail() max_val = 0 else: if a[i] == i + 1: continue else: max_val = max(a[i], max_val) i += 1 if max_val: if a[i] == max_val: fail() else: if a[i] != i + 1: fail() print("YES")
if a[i]>max_val:
21
decision
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n/2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
for i in range(n/2):
14
operation
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n|1-i] < 3: ans = 'No' t = 1 print(ans)
if t - b[n|1-i] < 3:
18
operation
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i]>3: ans = 'No' t = 1 print(ans)
if t - b[n-1-i]>3:
18
decision
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i]<a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
if a[i]<a[i + 1]:
15
decision
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n - 2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
n = int(input()) a = [] t = 0 for i in range(n-1): a.append(int(input())) a.sort() b = [] ans = 'Yes' for i in range(n - 2, -1,-1): b.append(t) if a[i] != a[i - 1]: t += 1 t = 1 for i in range(n<<2): if a[i] == a[i + 1]: t += 1 else: if t - b[n-1-i] < 3: ans = 'No' t = 1 print(ans)
for i in range(n<<2):
14
operation