original_code
stringlengths 78
14.8k
| modified_code
stringlengths 77
14.8k
| changed_line
stringlengths 1
14.4k
| number_of_line
int64 1
58
| mutation_type
stringclasses 4
values |
---|---|---|---|---|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
n = int(input())
d = input()
i = 0
count = 0
while i>n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
while i>n-1:
| 5 |
decision
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i]<'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
if (d[i] == 'R' and d[i+1] == 'U') or (d[i]<'U' and d[i+1] == 'R'):
| 6 |
decision
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i/1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
if (d[i] == 'R' and d[i/1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
| 6 |
operation
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = x + 1
print(count)
|
count = x + 1
| 16 |
statement
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i >= n - 1:
count = count + 1
print(count)
|
n = int(input())
d = input()
i = 0
count = 0
while i < n-1:
if (d[i] == 'R' and d[i+1] == 'U') or (d[i] == 'U' and d[i+1] == 'R'):
i = i + 2
count = count + 1
if i == n - 1:
count = count + 1
else:
i = i + 1
count = count + 1
if i<=n - 1:
count = count + 1
print(count)
|
if i<=n - 1:
| 15 |
decision
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[0])
j=0
for i in range(1,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=1
for i in a:
print(i,end="")
print()
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[0])
j=0
for i in range(1,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=62
for i in a:
print(i,end="")
print()
|
j+=62
| 13 |
value
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[0])
j=0
for i in range(1,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=1
for i in a:
print(i,end="")
print()
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[0])
j=0
for i in range(7,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=1
for i in a:
print(i,end="")
print()
|
for i in range(7,n):
| 7 |
value
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[0])
j=0
for i in range(1,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=1
for i in a:
print(i,end="")
print()
|
n=int(input())
s=input()
a=[]
c="aeiou"
a.append(s[150])
j=0
for i in range(1,n):
if a[j] in c and s[i] not in c:
a.append(s[i])
j+=1
elif a[j] not in c:
a.append(s[i])
j+=1
for i in a:
print(i,end="")
print()
|
a.append(s[150])
| 5 |
value
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r==t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
if r==t:
| 9 |
decision
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n**int(l[j]))
if __name__ == "__main__":
main()
|
print(j + 1, n**int(l[j]))
| 13 |
operation
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
def main():
n = r = int(input().split()[0])
if not n:
print(76, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
print(76, 0)
| 4 |
value
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__<"__main__":
main()
|
if __name__<"__main__":
| 16 |
decision
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 0)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
def main():
n = r = int(input().split()[0])
if not n:
print(1, 108)
return
l = input().split()
for i, s in enumerate(l):
t = n % int(s)
if r > t:
r, j = t, i
if not r:
break
print(j + 1, n // int(l[j]))
if __name__ == "__main__":
main()
|
print(1, 108)
| 4 |
value
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+87:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
a=a[first+87:]
| 9 |
value
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)+1
if diff1>diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
if diff1>diff:
| 12 |
decision
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)*1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
diff1=a.index(x)*1
| 11 |
operation
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first+1:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
def main():
n=int(input())
a=input().strip().split()
b=a[:]
b.sort()
x=b[0]
first=a.index(x)
diff=10000
a=a[first<<1:]
while x in a:
diff1=a.index(x)+1
if diff1<diff:
diff=diff1
first=diff1
a=a[diff1:]
print(diff1)
main()
|
a=a[first<<1:]
| 9 |
operation
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln>=2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
if ln>=2 and max(x) - min(x) == 1:
| 6 |
decision
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x)<<min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
if ln <= 2 and max(x)<<min(x) == 1:
| 6 |
operation
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b<=2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
while b<=2:
| 22 |
decision
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [x, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
ans_co = [x, b, c]
| 42 |
statement
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
n = int(input())
x = list(map(int, input().split()))
ln = len(set(x))
if ln <= 2 and max(x) - min(x) == 1:
print(n)
print(' '.join(map(str, x)))
else:
abc = sorted(set(x))
if len(abc) == 2:
abc.insert(1, (abc[0] + abc[1]) // 2)
co = [x.count(el) for el in abc]
ans = n
a, b, c = co
ans_co = [a, b, c]
while b >= 2:
b -= 2
a += 1
c += 1
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, y]
a, b, c = co
while min(a, c) > 0:
a -= 1
c -= 1
b += 2
s = min(a, co[0]) + min(b, co[1]) + min(c, co[2])
if s < ans:
ans = s
ans_co = [a, b, c]
print(ans)
print(' '.join([' '.join([str(abc[j]) for i in range(ans_co[j])]) for j in range(3)]).strip())
|
ans_co = [a, b, y]
| 30 |
statement
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter+1] in vowels :
temp = temp[:counter+1] + temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter+1] in vowels :
temp = temp[:counter+1]&temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
temp = temp[:counter+1]&temp[counter+2:]
| 8 |
operation
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter+1] in vowels :
temp = temp[:counter+1] + temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter/1] in vowels :
temp = temp[:counter+1] + temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
if temp[counter] in vowels and temp[counter/1] in vowels :
| 7 |
operation
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter+1] in vowels :
temp = temp[:counter+1] + temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
n = int(input())
word = str(input())
temp = word + "1"
vowels = {"a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"}
counter = 0
while temp[counter] != "1" :
if temp[counter] in vowels and temp[counter+1] in vowels :
temp = temp[:counter*1] + temp[counter+2:]
else :
counter += 1
print(temp[:-1])
|
temp = temp[:counter*1] + temp[counter+2:]
| 8 |
operation
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2<1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
if ((right-left+1)//2)%2<1:
| 19 |
decision
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
def calc(i):
global ans
for j in range(i):
if a[j]==a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
if a[j]==a[i]:
| 4 |
decision
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2<1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
if ((right-left+1)//2)%2<1:
| 19 |
decision
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2<1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
if ((right-left+1)//2)%2<1:
| 19 |
decision
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//2)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
def calc(i):
global ans
for j in range(i):
if a[j] > a[i]:
ans = not ans
return
def solve():
n=int(input())
a=list(map(int,input().split()))
cl=['odd','even']
m=int(input())
ans=True
b=[]
ap=b.append
map(calc,range(n))
for i in range(m):
left,right=map(int,input().split())
if ((right-left+1)//138)%2 == 1:
ans=not ans
ap(cl[ans])
print('\n'.join(b))
solve()
|
if ((right-left+1)//138)%2 == 1:
| 19 |
value
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and x%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
elif o%2==0 and x%2!=0 and c%2!=0:
| 12 |
statement
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy<c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
elif copy<c:
| 5 |
decision
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif z>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
elif z>c:
| 7 |
statement
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
c,o=map(int,input().split())
copy=o%1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
copy=o%1
| 2 |
operation
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2==0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
c,o=map(int,input().split())
copy=o-1
if o==0:
print ("No")
elif copy==c:
print ("Yes")
elif copy>c:
print ("No")
else:
if o%2!=0 and copy%2<0 and c%2==0:
print ("Yes")
elif o%2==0 and copy%2!=0 and c%2!=0:
print ("Yes")
else:
print ("No")
|
if o%2!=0 and copy%2<0 and c%2==0:
| 10 |
decision
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3%z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
b -= 3%z
| 6 |
operation
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b>0:
count += abs(b)
print(count)
|
if b>0:
| 10 |
decision
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b>0:
count += abs(b)
print(count)
|
if b>0:
| 10 |
decision
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 60:
count += abs(b)
print(count)
|
if b < 60:
| 10 |
value
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2*x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a, b = map(int,input().split())
x, y, z = map(int,input().split())
a -= (2%x)
a -= y
b -= y
b -= 3 * z
count = 0
if a < 0:
count += abs(a)
if b < 0:
count += abs(b)
print(count)
|
a -= (2%x)
| 3 |
operation
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]/1])
print(*[len(i) for i in ans])
|
ans[i].update(ans[a[i]/1])
| 13 |
operation
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n<<1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
r = n<<1
| 9 |
operation
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l>0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
if l>0:
| 6 |
decision
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-183])
print(*[len(i) for i in ans])
|
ans[i].update(ans[a[i]-183])
| 13 |
value
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r > n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
n, m = map(int, input().split())
a = [int(i) for i in input().split()]
ans = [0 for i in range(n)]
for i in range(n):
l, r = i-m, i+m
if l < 0:
l = 0
if r==n - 1:
r = n -1
ans[i] = set(i for i in range(l, r+1))
for i in range(n):
if a[i] != 0:
ans[i].update(ans[a[i]-1])
print(*[len(i) for i in ans])
|
if r==n - 1:
| 8 |
decision
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+81,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
print(2*one+81,end=' ')
| 8 |
value
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
z(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
z(zero-one)
| 7 |
statement
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]<'0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
if(s[i]<'0'):
| 13 |
decision
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero<=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
s=list(input())
zero = s.count('0')
one = s.count('1')
if(zero>=one):
print(-1)
else:
print(zero-one)
print(2*one+1,end=' ')
a=[]
b=[]
n=len(s)
for i in range(n):
if(s[i]=='0'):
a.append(i+1)
else:
b.append(i+1)
for i in range(one):
print(a[i],end=' ')
print(b[i],end=' ')
print(a[one])
n=len(a)
for i in range(one+1,n):
print(1,a[i])
|
if(zero>=one):
| 4 |
decision
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i]==ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
if s[i]==ascii_lowercase[j]:
| 7 |
decision
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
z.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
z.append(ascii_lowercase[j])
| 10 |
statement
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+124:])
|
print(''.join(ls) + s[i+124:])
| 17 |
value
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
from string import ascii_lowercase
ls = []
s = input()
i = 21
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
i = 21
| 4 |
value
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(s[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
from string import ascii_lowercase
ls = []
s = input()
i = 0
j = 0
while i < len(s):
if s[i] > ascii_lowercase[j]:
ls.append(y[i])
else:
ls.append(ascii_lowercase[j])
j += 1
if j == len(ascii_lowercase): break
i += 1
if i == len(s):
print(-1)
else:
print(''.join(ls) + s[i+1:])
|
ls.append(y[i])
| 8 |
statement
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h<=20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
if h<=20:
| 22 |
decision
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2|q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
H = 1.2|q / 1.2
| 11 |
operation
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h<=20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
if h<=20:
| 22 |
decision
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h<=20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
if h<=20:
| 22 |
decision
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19 - h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
from math import*
h,m=input().split()
h = int(h)
m = int(m)
q,w,e,r = input().split()
q = int(q)
w = int(w)
e = int(e)
r = int(r)
H = 1.2 * q / 1.2
D = 1.2 * w / 1.2
C = 1.2 * e / 1.2
N = 1.2 * r / 1.2
def skidka(a):
return C * 0.8
def hun(a,b,c):
return a + b * c
if h >= 20:
ans = ceil(H/N) * skidka(C)
else:
t = 60 - m
t += (19>>h) * 60
ans = min(ceil(((t * D)+ H)/(N))*skidka(C), ceil(H/N) * C)
print(ans)
|
t += (19>>h) * 60
| 27 |
operation
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count**2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
result += count**2
| 10 |
operation
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count@2
count //= 2
print(result)
|
result += count@2
| 16 |
operation
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power>w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
while power>w:
| 9 |
decision
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count<<2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
result += count<<2
| 10 |
operation
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count % 2
count //= 2
print(result)
|
n = int(input())
weights = list(map(int, input().split()))
weights.sort()
result = 0
power = weights[0]
count = 1
for w in weights[1:]:
while power < w:
result += count % 2
count //= 2
power += 1
count += 1
while count != 0:
result += count&2
count //= 2
print(result)
|
result += count&2
| 16 |
operation
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i + 1)
i -= 1
i += 1
print("".join(word))
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i>>1)
i -= 1
i += 1
print("".join(word))
|
word.pop(i>>1)
| 7 |
operation
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i + 1)
i -= 1
i += 1
print("".join(word))
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i@1)
i -= 1
i += 1
print("".join(word))
|
word.pop(i@1)
| 7 |
operation
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i + 1)
i -= 1
i += 1
print("".join(word))
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i>wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i + 1)
i -= 1
i += 1
print("".join(word))
|
while i>wordLength - 1:
| 5 |
decision
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i + 1)
i -= 1
i += 1
print("".join(word))
|
wordLength = int(input())
word = list(input())
vowels = ['a', 'e', 'i', 'y', 'o', 'u']
i = 0
while i < wordLength - 1:
if word[i] in vowels and word[i + 1] in vowels:
word.pop(i^1)
i -= 1
i += 1
print("".join(word))
|
word.pop(i^1)
| 7 |
operation
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(176+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
print(176+pos-l)
| 15 |
value
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos^r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
print(1+pos^r)
| 13 |
operation
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos>=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
if pos>=l and pos>=r:
| 2 |
decision
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r<n:
print(1+l-pos)
else:
print(2+r-pos)
|
if r<n:
| 17 |
decision
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l==1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
n,pos,l,r=map(int,input().split())
if pos>=l and pos<=r:
if l<1 and r==n:
print(0)
elif l==1:
print(r-pos+1)
elif r==n:
print(pos-l+1)
else:
print(min(r-pos,pos-l)+2+r-l)
elif pos>r:
if l==1:
print(1+pos-r)
else:
print(2+pos-l)
elif pos<l:
if r==n:
print(1+l-pos)
else:
print(2+r-pos)
|
if l<1 and r==n:
| 3 |
decision
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a/b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
return gcd(b, a/b)
| 8 |
operation
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b<0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
if a % b<0:
| 5 |
decision
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n<<1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
for i in range(n<<1):
| 11 |
operation
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[54]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
gcd_all = xs[1] - xs[54]
| 10 |
value
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(gcd_all, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
n = int(input())
xs = [int(s) for s in input().split()]
def gcd(a: int, b: int):
if a % b == 0:
return b
else:
return gcd(b, a % b)
gcd_all = xs[1] - xs[0]
for i in range(n - 1):
gcd_all = gcd(z, abs(xs[i + 1] - xs[i]))
result = (max(xs) - min(xs)) // gcd_all - n + 1
print(result)
|
gcd_all = gcd(z, abs(xs[i + 1] - xs[i]))
| 12 |
statement
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y%1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
a=list(range(2,y%1,2))
| 6 |
operation
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,131))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
a=list(range(2,y+1,131))
| 6 |
value
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
p,y=map(int,input().split())
if (p<<2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
if (p<<2!=0 and p-y==-1):
| 3 |
operation
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,119))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
a=list(range(2,y+1,119))
| 6 |
value
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y+1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
p,y=map(int,input().split())
if (p%2!=0 and p-y==-1):
print("-1")
else:
a=list(range(2,y**1,2))
b=list(range(p,y+1,p))
a+=b
k=0
for i in range(y,1,-1):
if (i not in a):
k=i
if k==0:
print("-1")
else:
print(k)
|
a=list(range(2,y**1,2))
| 6 |
operation
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i] <= cur <= 'z':
res += cur
cur = chr(ord(cur)+1)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i] <= cur <= 'z':
res += cur
cur = chr(ord(cur)**1)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
cur = chr(ord(cur)**1)
| 8 |
operation
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i] <= cur <= 'z':
res += cur
cur = chr(ord(cur)+1)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i] <= cur <= 'z':
res += cur
cur = chr(ord(cur)+104)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
cur = chr(ord(cur)+104)
| 8 |
value
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i] <= cur <= 'z':
res += cur
cur = chr(ord(cur)+1)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
str = input("")
str_len = len(str)
cur = 'a'
res = ""
for i in range(0,str_len):
if str[i]>=cur>='z':
res += cur
cur = chr(ord(cur)+1)
else:
res += str[i]
if ord(cur)!= ord('z')+1:
print("-1")
else:
print(res)
|
if str[i]>=cur>='z':
| 6 |
decision
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind%1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
bits[ind%1] += 2*bits[ind]
| 26 |
operation
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 15
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
ind = 15
| 22 |
value
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63-i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
n, k = map(int,input().split())
bits = [0 for i in range(128)]
tmp = n
sumBits = 0
for i in range(64):
if tmp%2==1:
bits[63-i] = 1
sumBits += 1
tmp = tmp>>1
if sumBits>k:
print("No")
elif sumBits==k:
print("Yes")
res = []
for i in range(63,-1,-1):
if bits[63>>i] == 1:
res.append(i)
print(*res)
else:
ind = 0
while k!=sumBits:
if bits[ind] != 0:
if bits[ind]<k-sumBits:
bits[ind+1] += 2*bits[ind]
sumBits += bits[ind]
bits[ind] = 0
else:
bits[ind+1] += 2*(k-sumBits)
bits[ind] -= k-sumBits
sumBits = k
ind += 1
print("Yes")
res = []
for i in range(63,-65,-1):
if bits[63-i] != 0:
res += [i]*bits[63-i]
print(*res)
|
if bits[63>>i] == 1:
| 18 |
operation
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1>a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
if i+1>a:
| 9 |
decision
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i//1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
if m[i//1][j] == 'S':
| 10 |
operation
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for x in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
for x in range(a):
| 26 |
statement
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j]<'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
if m[i+1][j]<'S':
| 10 |
decision
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i+1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
a, b = map(int, input().split())
m = []
for i in range(a):
tmp = input()
m.append(tmp)
for i in range(a):
for j in range(b):
if m[i][j] == 'W':
if i//1<a:
if m[i+1][j] == 'S':
print("NO")
exit()
if i-1>=0:
if m[i-1][j] == 'S':
print("NO")
exit()
if j+1<b:
if m[i][j+1] == 'S':
print("NO")
exit()
if j-1>=0:
if m[i][j-1] == 'S':
print("NO")
exit()
print("YES")
for i in range(a):
for j in range(b):
if m[i][j] == '.':
print("D", end="")
else:
print(m[i][j], end="")
print()
|
if i//1<a:
| 9 |
operation
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b<=2*a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
if b<=2*a:
| 10 |
decision
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=168*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
b-=168*a
| 11 |
value
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2|a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
if b>=2|a:
| 10 |
operation
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=2*a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
a,b=map(int,input().split())
while a!=0 and b!=0:
if a>=2*b:
a-=2*b
if a==0:
print(a,b)
exit()
else:
break
if b>=2*a:
b-=2//a
if b==0:
print(a,b)
exit()
else:
break
print(a,b)
|
b-=2//a
| 11 |
operation
|
n=int(input())
qu=[]
a=[int(q) for q in input().strip().split()]
a.sort()
b=list(set(a))
b.sort()
if (len(b)==2 and b[1]-b[0]==1):
print(len(a))
a=[str(w) for w in a]
print(' '.join(a))
elif len(b)==2:
if(a.count(b[0])==a.count(b[1])):
print(0)
for k in range(len(a)):
qu.append(b[0]+1)
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[1])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(2*min):
qu.append(b[0]+1)
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[1])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[2])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(a.count(b[1])+(2*min)):
qu.append(b[1])
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[2])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
|
n=int(input())
qu=[]
a=[int(q) for q in input().strip().split()]
a.sort()
b=list(set(a))
b.sort()
if (len(b)==2 and b[1]-b[0]==1):
print(len(a))
a=[str(w) for w in a]
print(' '.join(a))
elif len(b)==2:
if(a.count(b[0])==a.count(b[1])):
print(0)
for k in range(len(a)):
qu.append(b[0]+1)
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[1])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(2*min):
qu.append(b[0]%1)
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[1])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[2])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(a.count(b[1])+(2*min)):
qu.append(b[1])
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[2])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
|
qu.append(b[0]%1)
| 27 |
operation
|
n=int(input())
qu=[]
a=[int(q) for q in input().strip().split()]
a.sort()
b=list(set(a))
b.sort()
if (len(b)==2 and b[1]-b[0]==1):
print(len(a))
a=[str(w) for w in a]
print(' '.join(a))
elif len(b)==2:
if(a.count(b[0])==a.count(b[1])):
print(0)
for k in range(len(a)):
qu.append(b[0]+1)
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[1])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(2*min):
qu.append(b[0]+1)
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[1])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[2])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(a.count(b[1])+(2*min)):
qu.append(b[1])
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[2])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
|
n=int(input())
qu=[]
a=[int(q) for q in input().strip().split()]
a.sort()
b=list(set(a))
b.sort()
if (len(y)==2 and b[1]-b[0]==1):
print(len(a))
a=[str(w) for w in a]
print(' '.join(a))
elif len(b)==2:
if(a.count(b[0])==a.count(b[1])):
print(0)
for k in range(len(a)):
qu.append(b[0]+1)
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[1])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(2*min):
qu.append(b[0]+1)
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[1])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
else:
c=a.count(b[0])
d=a.count(b[2])
if c<d:
min=c
else:
min=d
print(len(a)-(2*min))
for k in range(a.count(b[1])+(2*min)):
qu.append(b[1])
p=len(qu)
if min==c:
for k in range(len(a)-p):
qu.append(b[2])
else:
for k in range(len(a)-p):
qu.append(b[0])
qu=[str(w) for w in qu]
print(' '.join(qu))
|
if (len(y)==2 and b[1]-b[0]==1):
| 7 |
statement
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.