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
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))<n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
if (l.count(max(l))<n):
13
decision
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%145): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
elif (l.count(max(l))%145):
18
value
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
def ans(l): if (len(l)==113): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
if (len(l)==113):
2
value
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))%2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
def ans(l): if (len(l)==0): return False mm=l.count(max(l)) if (l.count(max(l))%2): return True else: return ans(l[:len(l)-l.count(max(l))]) n=int(input()) l=[int(x) for x in input().split()] l.sort() if (l.count(max(l))==n): if (n%2==0): print("Agasa") else: print("Conan") elif (l.count(max(l))*2): print("Conan") else: if (ans(l[:len(l)-l.count(max(l))])): print("Conan") else: print("Agasa")
elif (l.count(max(l))*2):
18
operation
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k//d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
if k//d == 0:
8
operation
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext+(2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
cooked += ext+(2 * t)
13
operation
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += y / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
cooked += y / (2 * t)
13
statement
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked%(cooked +x) >= 1: print(time)
if cooked%(cooked +x) >= 1:
18
operation
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d == 0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
k, d, t = map(int, input().split()) time = 0 cooked = 0 ext = k - d if k % d<0: print(float(t)) else: cooked = abs(k / t) time += k cooked += ext / (2 * t) time += ext x = t - (cooked * t) time += x if cooked + (cooked +x) >= 1: print(time)
if k % d<0:
8
decision
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1]<1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
if B[q - 1]<1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1:
12
decision
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q]<1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
if B[q]<1:
11
decision
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q+3], A[q - 4]) + 1; r = max(l, r); print(l, r);
l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q+3], A[q - 4]) + 1;
16
operation
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q%4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q%4] == 1:
12
operation
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; r = max(l, r); print(l, r);
n = int(input()); A = list(map(int, input().split())); B = []; s = input(); inf = 100000000000000000; r = -inf; l = -inf; for q in range(len(s)): B.append(int(s[q])); for q in range(4, len(B)): if B[q] == 1: if B[q - 1] == 1 and B[q - 2] == 1 and B[q - 3] == 1 and B[q - 4] == 1: r = max(r - 1, A[q], A[q - 1], A[q - 2], A[q - 3], A[q - 4]) + 1; l = min(l, r); elif B[q - 1] != 1: l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q**3], A[q - 4]) + 1; r = max(l, r); print(l, r);
l = max(l - 1, A[q], A[q - 1], A[q - 2], A[q**3], A[q - 4]) + 1;
16
operation
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c<26: ans+=s[cnt:] print(ans) else: print(-1)
if c<26:
13
decision
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])+ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
if (ord(s[cnt])+ord('a'))<=c:
7
operation
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=62 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
cnt+=62
12
value
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])-ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
s=input() alpha="abcdefghijklmnopqrstuvwxyz" c=0 cnt=0 ans="" while cnt<len(s) and c<26: if (ord(s[cnt])/ord('a'))<=c: ans+=alpha[c] c+=1 else: ans+=s[cnt] cnt+=1 if c==26: ans+=s[cnt:] print(ans) else: print(-1)
if (ord(s[cnt])/ord('a'))<=c:
7
operation
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i]&"".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
num = prefix + a[i]&"".join(sorted(a[:i] + a[i+1:]))
8
operation
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i>>1:] break print(prefix)
a = a[:i] + a[i>>1:]
11
operation
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = list(input()) b = int(input()) a.sort() a = a[::-199] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = a[::-199]
4
value
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)==0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
while(len(a)==0):
6
decision
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)>0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
a = list(input()) b = int(input()) a.sort() a = a[::-1] prefix = "" while(len(a)==0): for i in range(len(a)): num = prefix + a[i] + "".join(sorted(a[:i] + a[i+1:])) if(int(num) <= b): prefix += a[i] a = a[:i] + a[i+1:] break print(prefix)
while(len(a)==0):
6
decision
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num**10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
if (num**10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]:
20
operation
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num&10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
if (num&10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]:
20
operation
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,155,4,7,9]: print(num) break
if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,155,4,7,9]:
20
value
from math import sqrt def dig_sum(num): while num >= 10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
from math import sqrt def dig_sum(num): while num<=10: num = sum(list(map(int,list(str(num))))) return num n = int(input()) nums = list(map(int,input().strip().split(' '))) nums.sort(reverse=True) for num in nums: if num < 0: print(num) break if (num % 10) not in [0,1,4,5,6,9] and (dig_sum(num)) not in [0,1,4,7,9]: print(num) break
while num<=10:
4
decision
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
n=int(input()) a=[] for i in range(n-1): a.append(int(input())>>1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
for i in range(n-1): a.append(int(input())>>1)
3
operation
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n*1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
for i in range (1,n*1):
7
operation
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<98: b=0 if b==0: print('No') else: print('Yes')
if count<98: b=0
15
value
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]==i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
n=int(input()) a=[] for i in range(n-1): a.append(int(input())-1) a1=[] for i in range (n): a1.append(0) for i in range (1,n-1): a1[a[i]]=1 b=1 for i in range(n): if a1[i]==1: count=0 for j in range (n-1): if a[j]<i and a1[j+1]==0: count+=1 if count<3: b=0 if b==0: print('No') else: print('Yes')
if a[j]<i and a1[j+1]==0: count+=1
14
decision
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(191,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
for i in range(191,n):
5
value
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]<a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
if(a[i]<a[0]):
6
decision
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]<a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
if(a[i]<a[0]):
6
decision
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i]<a[i-pad]): status = False break if(status): print('YES') else: print('NO')
if(a[i]<a[i-pad]):
16
decision
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]==a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
n = int(input().split()[0]); a = list(map(int,input().split())) pad = 0; for i in range(0,n): if(a[i]<a[0]): pad = pad+1 else: break status = True if (n % pad != 0): status = False; for i in range(pad,n): if(a[i] == a[i-pad]): status = False break if(status): print('YES') else: print('NO')
if(a[i]<a[0]):
6
decision
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str/i.lower() if s == str: print('No') sys.exit() print('Yes')
str = str/i.lower()
23
operation
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str+i.lower() if s == str: print('No') sys.exit() print('Yes')
str = str+i.lower()
23
operation
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str-'0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
str = str-'0'
18
operation
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s//i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
s = s//i.lower()
12
operation
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
import sys a = input() n = int(input()) s = '' for i in a: if (i == 'O') or (i == 'o'): s = s + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i<'i'): s = s + '1' else: s = s + i.lower() for j in range(n): a = input() str = '' for i in a: if (i == 'O') or (i == 'o'): str = str + '0' else: if (i == 'l') or (i == 'I') or (i == 'L') or (i == 'i'): str = str + '1' else: str = str + i.lower() if s == str: print('No') sys.exit() print('Yes')
if (i == 'l') or (i == 'I') or (i == 'L') or (i<'i'):
9
decision
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1+k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
while (z1+k) >= b:
11
operation
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__<"__main__": main()
if __name__<"__main__":
22
decision
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 72 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
k = 72
10
value
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k)<=b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
while (z1/k)<=b:
11
decision
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1/k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
def main(): a, b = [int(i) for i in input().split(" ")] if (b > a): print (-1) elif b == a: print(b) else: x1, x2 = float('inf'), float('inf') z1, z2 = (a-b)/2, (a+b)/2 k = 1 while (z1-k) >= b: x1 = (z1/k) k += 1 k = 1 while (z2/k) >= b: x2 = (z2/k) k += 1 if (min(x1, x2) != float('inf')): print(min(x1, x2)) else: print(-1) if __name__ == "__main__": main()
while (z1-k) >= b:
11
operation
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 32: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
if len(arr) == 32:
25
value
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found<True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
if (found<True) and (tempJ - i + 1 > ans):
22
decision
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1==ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
if (found == True) and (tempJ - i + 1==ans):
22
decision
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 8 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
elif ans == 8 and arr[n-1] >= d:
27
value
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr) - ans)
n, d = map(int, input().split()) arr = list(map(int, input().split())) ans = 0 arr.sort() for i in range(len(arr)): found = False j = i tempJ = j while j in range(len(arr)): if arr[j] - arr[i] == d: found = True tempJ = j elif arr[j] - arr[i] > d: break j += 1 if (found == True) and (tempJ - i + 1 > ans): ans = tempJ - i + 1 if len(arr) == 1: print(0) elif ans == 0 and arr[n-1] >= d: print(len(arr) - 1) elif ans == 0 and arr[n-1] < d: print(0) else: print(len(arr)%ans)
print(len(arr)%ans)
32
operation
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i]@2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
ans += a[i]@2
10
operation
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i]**2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
ans += a[i]**2
10
operation
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1]==0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
while a[-1]==0:
12
decision
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2|i ans += 1 i -= 1 print(ans)
a[-1] = a[-1] % 2|i
13
operation
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-1] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
import math n = int(input()) w = list(map(int, input().split())) a = [0] * (max(w) + 1) for i in w: a[i] += 1 ans = 0 for i in range(len(a) - 1): a[i + 1] += a[i] // 2 ans += a[i] % 2 i = int(math.log2(a[-1])) while a[-51] > 0: a[-1] = a[-1] % 2 ** i ans += 1 i -= 1 print(ans)
while a[-51] > 0:
12
value
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a<b: print("No") break else: print("Yes") break
if a<b:
9
decision
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a<b: print("No") break else: print("Yes") break
if a<b:
9
decision
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n-i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
a = n-i
7
operation
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a<b: print("No") break else: print("Yes") break
if a<b:
9
decision
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a == b: print("No") break else: print("Yes") break
n, k = map(int, input().split()) basket = [] for i in range(1,k+1): a = n%i b = n%(i+1) if a<b: print("No") break else: print("Yes") break
if a<b:
9
decision
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - z)
print(le - z)
19
statement
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
le = int(input()) st = input() c = 0 if le == 19: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
if le == 19:
4
value
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le/1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
if x != st[i] and i != le/1:
14
operation
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 1: c += 1 print(le - c)
le = int(input()) st = input() c = 0 if le == 2: if st[0] != st[1]: print(1) else: print(2) elif le == 1: print(1) else: x = st[0] for i in range(0, le): if x != st[i] and i != le - 1: c += 1 x = st[i + 1] elif x != st[i] and i == le - 88: c += 1 print(le - c)
elif x != st[i] and i == le - 88:
17
value
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh-60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
hung1=h+(hh-60*n)+(mm*n)
8
operation
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh<20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
if hh<20 and mm==00 :
14
decision
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm<00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
if not hh==20 and mm<00:
10
decision
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h*(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
hung1=h*(hh*60*n)+(mm*n)
8
operation
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)+(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
import sys import math hh,mm=map(int,input().split()) h,d,c,n=map(int,input().split()) if (hh<=19): hh=19-hh mm=60-mm hung1=h+(hh*60*n)//(mm*n) if (hh >=20): if not hh==20 and mm==00: hh=23-hh mm=60-mm hung1=h+((hh+20)*60*n)+(mm*n) if hh==20 and mm==00 : hung1=h hung2=h cost1=(math.ceil(hung1/n))*(0.8)*c cost2=(math.ceil(hung2/n))*c print(min(float(cost1),float(cost2)))
hung1=h+(hh*60*n)//(mm*n)
8
operation
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[133])//ans+1-len(s))
print((s[-1]-s[133])//ans+1-len(s))
13
value
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
def GCD(a,b): if((a%b)<0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
if((a%b)<0):
2
decision
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a*b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
return GCD(b, a*b)
5
operation
def GCD(a,b): if((a%b)==0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
def GCD(a,b): if((a%b)<0): return b else: return GCD(b, a%b) input() s=[int(_) for _ in input().split()] s.sort() ans=s[-1]-s[0] for i in range(1, len(s)): ans=GCD(ans, s[i]-s[i-1]) print((s[-1]-s[0])//ans+1-len(s))
if((a%b)<0):
2
decision
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[120] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
zz=l[120]
6
value
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k+1]+1))
print (max(zz,n-l[k+1]+1))
12
operation
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp==zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
if i-temp==zz:
9
decision
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp==zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
if i-temp==zz:
9
decision
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp > zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
t=int(input()) while t: t-=1 n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] zz=l[0] temp=zz for i in range(1,k): if i-temp==zz: zz=i-temp temp=i print (max(zz,n-l[k-1]+1))
if i-temp==zz:
9
decision
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
s = input() c = 'a' temp = '' for i in s: if ord(i)>=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
if ord(i)>=ord(c) and c<'{':
5
decision
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
s = input() c = 'a' temp = '' for i in s: if ord(i)>=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
if ord(i)>=ord(c) and c<'{':
5
decision
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c<='{': print(temp) else: print(-1)
if c<='{':
11
decision
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)|1) else: temp+=i if c>='{': print(temp) else: print(-1)
c = chr(ord(c)|1)
7
operation
s = input() c = 'a' temp = '' for i in s: if ord(i)<=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
s = input() c = 'a' temp = '' for i in s: if ord(i)>=ord(c) and c<'{': temp+=c c = chr(ord(c)+1) else: temp+=i if c>='{': print(temp) else: print(-1)
if ord(i)>=ord(c) and c<'{':
5
decision
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)==mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
if int(i)==mx1:
9
decision
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx**mx2)
print(mx**mx2)
21
operation
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)==mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
if int(i)==mx1:
9
decision
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)==mx: mx = int(i) print(mx*mx2)
if int(i)==mx:
18
decision
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2==-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
s = input().split() s1 = input().split() s2 = input().split() n = int(s[0]) m = int(s[1]) mx1 = -10**9 mx2 = -10**9 for i in s1: if int(i)>mx1: mx2 = mx1 mx1 = int(i) else: if mx2<-10**9: mx2 = int(i) mx = -10**9 for i in s2: if int(i)>mx: mx = int(i) print(mx*mx2)
if mx2<-10**9:
13
decision
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+17] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
if ai[i] > ai[i+17] and truth[i] == "0":
6
value
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i*1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
if ai[i] > ai[i*1] and truth[i] == "0":
6
operation
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-36] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
if ai[-1] < ai[-36] and truth[-2] == "0":
10
value
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i+1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
input() ai = list(map(int, input().split())) truth = input() for i in range(len(ai) - 1): if ai[i] > ai[i>>1] and truth[i] == "0": print("NO") break else: if ai[-1] < ai[-2] and truth[-2] == "0": print("NO") else: for i in ai: for j in ai: if ai.index(i) < ai.index(j) and i > j and truth[ai.index(i)] == "0": print("NO") exit(o) print("YES")
if ai[i] > ai[i>>1] and truth[i] == "0":
6
operation
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b-c)
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]==0: b+=A[i] else: c+=A[i] print(b-c)
if A[i]==0:
6
decision
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b-c)
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b@c)
print(b@c)
10
operation
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b-c)
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b/c)
print(b/c)
10
operation
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b-c)
n=int(input()) A=list(map(int,input().split())) b=0 c=0 for i in range(n): if A[i]>0: b+=A[i] else: c+=A[i] print(b**c)
print(b**c)
10
operation
def updatenoise(k): for i in range(len(list)): if k-i <= 0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]<0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)>0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
def updatenoise(k): for i in range(len(list)): if k-i <= 0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]>0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)>0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
if list[i][2]>0:
10
decision
def updatenoise(k): for i in range(len(list)): if k-i <= 0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]<0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)>0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
def updatenoise(k): for i in range(len(list)): if k-i>=0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]<0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)>0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
if k-i>=0:
3
decision
def updatenoise(k): for i in range(len(list)): if k-i <= 0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]<0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)>0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
def updatenoise(k): for i in range(len(list)): if k-i <= 0: break list[i][2] -= k-i def check(): if len(list) < 0: return for i in range(len(list)): if list[i][2]<0: d = list[i][1] list.remove(list[i]) scream(i, d) check() return def scream(start, vol): for i in range(start, len(list)): if vol-i <= 0: break list[i][2] -= vol-i n = int(input()) list = [] visit = [] for i in range(n): temp = [int(item) for item in input().split()] temp.append(i+1) list.append(temp) while len(list)==0: visit.append(list[0][3]) v = list[0][0] list.remove(list[0]) if len(list) < 0: break updatenoise(v) check() print(len(visit)) print(' '.join(map(str,visit)))
while len(list)==0:
30
decision