Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(1000000)

N = int(input())
X = input()
pc = X.count('1')


if pc == 0:
    print(*[1]*N, sep='\n')
    exit()
elif pc == 1:
    if int(X, 2) == 1:
        for i in range(N-1):
            print(2)
        print(0)
        exit()
    else:
        for i in range(N):
            if X[i] == '0':
                print(1)
            else:
                print(0)
        exit()

mod_plus_1, mod_minus_1 = 0, 0
for i in range(N):
    mod_plus_1 = (mod_plus_1*2+X[i]) % (pc+1)
    mod_minus_1 = (mod_minus_1*2+X[i]) % (pc-1)


def f(x):
    if x == 0:
        return 0
    else:
        return f(x % bin(x).count('1'))+1


for i in range(N):
    if X[i] == '0':
        x = mod_plus_1 + 2**(N-1-i) % (pc+1)
        x %= (pc+1)
    else:
        x = mod_minus_1 - 2**(N-1-i) % (pc-1)
        x %= (pc-1)

    if x == 0:
        print(1)
    else:
        print(f(x)+1)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

N = int(input())
X = input()
pc = X.count('1')


if pc == 0:
    print(*[1]*N, sep='\n')
    exit()
elif pc == 1:
    if int(X, 2) == 1:
        for i in range(N-1):
            print(2)
        print(0)
        exit()
    else:
        for i in range(N):
            if i == N-1:
                print(2)
            elif X[i] == '0':
                print(1)
            else:
                print(0)
        exit()

mod_plus_1, mod_minus_1 = 0, 0
for i in range(N):
    mod_plus_1 = (mod_plus_1*2+int(X[i])) % (pc+1)
    mod_minus_1 = (mod_minus_1*2+int(X[i])) % (pc-1)


def f(x):
    if x == 0:
        return 0
    else:
        return f(x % bin(x).count('1'))+1


mods_p1, mods_m1 = [1 % (pc+1)], [1 % (pc-1)]
for i in range(N-1):
    mods_p1.append(mods_p1[-1]*2 % (pc+1))
    mods_m1.append(mods_m1[-1]*2 % (pc-1))
mods_p1 = mods_p1[::-1]
mods_m1 = mods_m1[::-1]


for i in range(N):
    if X[i] == '0':
        x = mod_plus_1 + mods_p1[i]
        x %= (pc+1)
    else:
        x = mod_minus_1 - mods_m1[i]
        x %= (pc-1)

    if x == 0:
        print(1)
    else:
        print(f(x)+1)
N,K=map(int,input().split())
p=list(map(int,input().split()))
p.sort()
print(sum(p[0:K-1])

### FIXED CODE ###

N,K=map(int,input().split())
p=list(map(int,input().split()))

p.sort()
print(sum(p[0:K]))
a, b=map(int, input().split())
if (a*b)%2==0:
  print(Even)
else:
  print(Odd)

### FIXED CODE ###

a, b=map(int, input().split())
if (a*b)%2==0:
  print("Even")
else:
  print("Odd")
def culc(m):
    s=0
    if m%2==1:
        m1=1 #1の個数
        m2=m//2 #2の個数
    else:
        m1=0
        m2=m//2
    
    while m2>=0:
        l1=1
        l2=1
        for i in range(m2):
            l1=l1*(m1+i+1)
            l2=l2*(i+1)
        s+=int(l1/l2)
        m1+=2
        m2+=-1
    return s

N,M=map(int,input().split())
a1=-1
b=[]
for i in range(M):

    a2=int(input())
    da=a2-a1
    a1=a2
    if da==1:
        b=[]
        break
    elif da!=0:
        b+=[da-2]

else:
    b+=[N-a2-1]


if b==[]:
    sm=0
else:
    b.sort()
    c=culc(b[0])
    sm=c
    s1=b[0]
    for i in b[1:]:
        if s1==i:
            sm=sm*c
        else:
            c=culc(i)
            sm=sm*c
print(sm%1000000007)


### FIXED CODE ###

def culc(m):
    a1=0
    a2=1
    for i in range(m):
        a2_=a2
        a2=a1+a2
        a1=a2_
    return a2

N,M=map(int,input().split())
a=[-1]
b=[]
for i in range(M):
    a+=[int(input())]
    b+=[a[-1]-a[-2]-2]
    if a[-1]-a[-2]==1:
        b=[]
        break
else:
    b+=[N-a[-1]-1]
if b==[]:
    sm=0
else:
    sm=culc(b[0])
for i in b[1:]:
    sm=sm*culc(i)
print(sm%1000000007)
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
nums = [0] * N
friends = []
for _ in range(N):
    friends.append(set())

for _ in range(M):
    A, B = map(int, input().split())
    friends[A-1].add(B-1)
    friends[B-1].add(A-1)

gnum = 0
groupn = 0
nmax = 0

def find_route(i):
    global gnum
    global nums
    global friends
    global groupn
    global nmax
    if len(friends[i]) == 0:
        return
    if nums[i] == 0:
        gnum += 1
        if groupn > nmax:
            nmax = groupn
        groupn = 1
        nums[i] = gnum
    for f in friends[i]:
        if nums[f] == 0:
            nums[f] = gnum
            groupn += 1
            find_route(f)

for i in range(N):
    find_route(i)

print(max(nmax, 1))



### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000000)

N, M = map(int, input().split())
nums = [0] * N
friends = []
for _ in range(N):
    friends.append(set())

for _ in range(M):
    A, B = map(int, input().split())
    friends[A-1].add(B-1)
    friends[B-1].add(A-1)

gnum = 0
groupn = 0
nmax = 0

def find_route(i):
    global gnum
    global nums
    global friends
    global groupn
    global nmax
    if len(friends[i]) == 0:
        return
    if nums[i] == 0:
        gnum += 1
        groupn = 1
        nums[i] = gnum
    for f in friends[i]:
        if nums[f] == 0:
            nums[f] = gnum
            groupn += 1
            if groupn > nmax:
                nmax = groupn
            find_route(f)

for i in range(N):
    find_route(i)

print(max(nmax, 1))
X, N = map(int, input().split())
if N > 0:
    l = list(map(int, input().split()))
    A = [0] * N

    for i in range(N):
        A[i] = abs(l[i] - X)

    S = A.count(0)
    if S == 0:
        print(X)
        ok = 1

    if ok != 1:
        for i in range(1, 101):
            S = A.count(i)
            if S == 0:
                print(X - 1)
                break
            if S == 1:
                if l.count(X - i) == 0:
                    print(X - i)
                    break
                else:
                    print(X + i)
                    break
            else:
                pass

else:
    print(X)


### FIXED CODE ###

X, N, *d = map(int, open(0).read().split())
if N == 0:
    print(X)
else:
    ans = -100
    for i in range(102):
        if i not in d and abs(i - X) < abs(ans - X):
            ans = i

    print(ans)
from numpy import*
from itertools import*
N, K = map(int, input().split())
S=input()
zeros=[len(list(v)) for k,v in groupby(S) if k=="0"]
ones =[len(list(v)) for k,v in groupby(S) if k=="1"]


#print(zeros,ones)

c_zero= cumsum(zeros)
c_one = cumsum(ones)

#print(c_zero,c_one)

if len(zeros) <= K:
    print(len(S))
else:
    ans = 0
    for i in range(0, len(zeros) - K):
        aaa = c_zero[i+K]-c_zero[i] + c_one[i+K+1]-c_one[i]
        ans = max(aaa, ans)
    print(ans)

### FIXED CODE ###

from itertools import*
from numpy import*
n,k=map(int,input().split())
k=2*k+1
s=input()
x=[0]*(s[0]=="0")+[len(list(v))for k,v in groupby(s)]+[0]*(s[-1]=="0")
#print(x)
x1=array(x[k:])
x2=array(x[:-k])
x3=sum(x[:k])
y=[x3]+list(x3+cumsum(x1-x2))
print(max(y[::2]))
import numpy as np
N, A = map(int, input().split())
X = list(map(int, input().split()))
sum_X = sum(X)
dp = np.zeros((N+1, N+1, sum_X+1), np.int64)
dp[0][0][0] = 1
for i in range(N):
  for j in range(N):
    for k in range(sum_X):
      if dp[i][j][k] == 0: continue
      # not used
      dp[i+1][j][k] += dp[i][j][k]
      # used
      dp[i+1][j+1][k+X[i]] += dp[i][j][k]
ans = 0
for i in range(1, N+1):
  ans += dp[N][i][i*A]
print(ans)  

### FIXED CODE ###

N, A = map(int, input().split())
X = list(map(int, input().split()))
sum_X = sum(X)
dp = [[[0]*(sum_X+1) for _ in range(N+1)] for _ in range(N+1)]
dp[0][0][0] = 1
for i in range(N):
  for j in range(N):
    for k in range(sum_X):
      if dp[i][j][k] == 0: continue
      # not used
      dp[i+1][j][k] += dp[i][j][k]
      # used
      dp[i+1][j+1][k+X[i]] += dp[i][j][k]
ans = 0
for k in range(1, N+1):
  if k*A <= sum_X:
    ans += dp[N][k][k*A]
print(ans)
from time import time

start = time()
D = int(input())
C = [int(i) for i in input().split()]
scores = [[int(i) for i in input().split()] for j in range(D)]
t = []
for i in scores:
    t.append(i.index(max(i))+1)
DC = [0]*26

def calcScore(t):
    score = []
    S = 0
    last = [0]*26
    for d in range(1,D+1):
        S += scores[d-1][t[d-1]-1]
        last[t[d-1]-1] = d
        for i in range(26):
            S -= C[i] * (d - last[i])
            DC[i] += (d - last[i])
        score.append(S)
    return score[-1]

ts = calcScore(t)
i = D
j = 0
while time() - start < 1.95:
    d,q = i, j
    temp = [t[i] if d-1 != i else q for i in range(D)]
    j += 1
    if calcScore(temp) > ts:
        t = temp
        i -= 1
        j = 0

print("\n".join(map(str, t)))

### FIXED CODE ###

D = int(input())
C = [int(i) for i in input().split()]
scores = [[int(i) for i in input().split()] for j in range(D)]

for i in scores:
    print(i.index(max(i))+1)
import itertools
from operator import mul
from functools import reduce


def main():
    MOD = 1000000007
    inp = input().split()
    n = int(inp[0])
    k = int(inp[1])
    r = n - k
    for i in range(1, k + 1):
        rr = cmb(r + 1, i)
        if i == 1:
            bb = 1
        elif i == k:
            bb = 1
        else:
            bb = cmb(k - 1, i - 1)
        print((rr % MOD) * (bb % MOD) % MOD)


def cmb(n, r):
    r = min(n-r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


if __name__ == '__main__':
    main()


### FIXED CODE ###

from math import factorial


def main():
    MOD = 1000000007
    inp = input().split()
    n = int(inp[0])
    k = int(inp[1])
    r = n - k
    for i in range(1, k + 1):
        if r + 1 < i:
            print(0)
            continue
        elif r + 1 == i:
            rr = 1
        else:
            rr = cmb(r + 1, i)

        if i == 1:
            bb = 1
        elif i == k:
            bb = 1
        else:
            bb = cmb(k - 1, i - 1)
        print(((rr % MOD) * (bb % MOD)) % MOD)


def cmb(n, r):
    return factorial(n) // (factorial(r) * factorial(n - r))


if __name__ == '__main__':
    main()
read = input
read = Read(False, """


8 1000 800 100
300
333
400
444
500
555
600
666

""").read
tmp = read()
tmp = list(map(int, tmp.split(' ')))
N,A,B,C = tmp
opt = list(map(int, map(lambda x: read(), range(N))))
def dfs(n,a,b,c):
    ret = 10**7
    if(n == N):
        if(min(a,b,c) == 0):
            return ret
        return abs(A - a) + abs(B - b) + abs(C - c) - 30
    cur = opt[n]
    ret = min(ret, dfs(n+1, a + cur, b, c) + 10)
    ret = min(ret, dfs(n+1, a, b + cur, c) + 10)
    ret = min(ret, dfs(n+1, a, b ,c + cur) + 10)
    ret = min(ret, dfs(n+1, a, b ,c ) + 0)
    return ret
print(dfs(0, 0, 0, 0))

### FIXED CODE ###

read = input
# read = Read(False, """


# 8 1000 800 100
# 300
# 333
# 400
# 444
# 500
# 555
# 600
# 666

# """).read
tmp = read()
tmp = list(map(int, tmp.split(' ')))
N,A,B,C = tmp
opt = list(map(int, map(lambda x: read(), range(N))))
def dfs(n,a,b,c):
    ret = 10**7
    if(n == N):
        if(min(a,b,c) == 0):
            return ret
        return abs(A - a) + abs(B - b) + abs(C - c) - 30
    cur = opt[n]
    ret = min(ret, dfs(n+1, a + cur, b, c) + 10)
    ret = min(ret, dfs(n+1, a, b + cur, c) + 10)
    ret = min(ret, dfs(n+1, a, b ,c + cur) + 10)
    ret = min(ret, dfs(n+1, a, b ,c ) + 0)
    return ret
print(dfs(0, 0, 0, 0))
n,m,k=map(int,input().split())

a=list(map(int,input().split()))
b=list(map(int,input().split()))

if len(a)>len(b):
	a,b=b,a
i=0
j=0
total=0
cnt=0
while total<=k:
	if i<len(a):
		if a[i]<b[j]:
			total+=a[i]
			i+=1
		else:
			total+=b[j]
			j+=1
	elif j<len(b):
		total+=b[j]
		j+=1

	cnt+=1
	if total>k:
		cnt-=1
	if j==len(b) and i==len(a):
		break

print(cnt)




### FIXED CODE ###

n,m,k=map(int,input().split())

a=list(map(int,input().split()))
b=list(map(int,input().split()))


a_pre,b_pre=[0],[0]

for i in range(n):
	a_pre.append(a_pre[i]+a[i])

for i in range(m):
	b_pre.append(b_pre[i]+b[i])

ans,j=0,m
for i in range(n+1):
	if a_pre[i]>k:
		break
	while b_pre[j]>k-a_pre[i]:
		j-=1

	ans=max(ans,i+j)

print(ans)
n, q = map(int, input().split())
g = [[] * n for i in range(n)]

def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]

def unite(x,y):
    x = find(x)
    y = find(y)
    if x == y:
        return False
    else:
        if par[x] > par[y]:
            x,y = y,x
        par[x] += par[y]
        par[y] = x
        return True
      
par = [-1]*n
for i in range(n-1):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    g[u].append(v)
    g[v].append(u)
    unite(u,v)

chk = [0]*n
for i in range(q):
    x, y = map(int, input().split())
    chk[x-1] += y

def dfs(now, prev):
    # リストはglobal宣言の必要がない？
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        if next != prev:
            chk[next] += chk[now]
            dfs(next, now)

par = tuple(par)            
for i in range(n):
  if par[i] < 0:
    dfs(i,-1)

chk = list(map(str,chk))
print(' '.join(chk))

### FIXED CODE ###

import sys
input = sys.stdin.readline
import sys
sys.setrecursionlimit(1000000)

n, q = map(int, input().split())
g = [[] * n for i in range(n)]

par = [-1]*n
for i in range(n-1):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    g[u].append(v)
    g[v].append(u)

chk = [0]*n
for i in range(q):
    x, y = map(int, input().split())
    chk[x-1] += y

def dfs(now, prev):
    # リストはglobal宣言の必要がない？
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        if next != prev:
            chk[next] += chk[now]
            dfs(next, now)

dfs(0,-1)
print(*chk)
h, n = map(int, input().split())
a = input().split()

a.sort(reverse=True)

sum=0
for i in Range(N):
  sum += a[i]
  
if sum>=h:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

h, n = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

sum=0
for i in range(n):
  sum += a[i]
  
if sum>=h:
  print("Yes")
else:
  print("No")
print(48-map(int, input()))

### FIXED CODE ###

print(48-int(input()))
n,m = map(int, input().split())
a = []
for i in range(n):
  x,y = map(int, input().split())
  a.append((x,y))
a.sort()
ans = 1
l,r = a[0]
for x,y in a[1:]:
  if r <= x:
    ans += 1
    r = x
    l = y
  else:
    r = max(r, y)
print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
a = []
for i in range(m):
  x,y = map(int, input().split())
  a.append((x,y))
a.sort(key=lambda x:x[1])
ans = 1
l,r = a[0]
for x,y in a[1:]:
  if r <= x:
    ans += 1
    l = x
    r = y

print(ans)
n = int(input())
new = set(n)
if len(new) != 4:
  print("Bad")
else:
  print("Good")

### FIXED CODE ###

password = list(input())
if password[0] == password[1] or password[1] == password[2] or password[2] == password[3]:
  print("Bad")
else:
  print("Good")
N,M=[int(i) for i in input().split()]
# 二次元配列を得られる
A = []
answer=[0]*M
for i in range(M):
    A.append(list(map(int,input().split())))
j=0
for i in range(M):
    if answer[int(A[i][0])-1] == 0:
        answer[int(A[i][0])-1] = int(A[i][1])
    elif answer[int(A[i][0])-1] == int(A[i][1]):
        answer[int(A[i][0])-1] = int(A[i][1])
    else:
        print(-1)
        j=j+1
        break
seisu=0
if j==0 and answer[0]==0 and N!=1:
    j=j+1
    print(-1)
if j==0:
    for i in range(M):
        seisu=answer[i]*(10**(M-i-1))+seisu
    print(seisu)


### FIXED CODE ###

N,M=[int(i) for i in input().split()]
# 二次元配列を得られる
A = []
answer=[-1]*N
for i in range(M):
    A.append(list(map(int,input().split())))
j=0
for i in range(M):
    if answer[int(A[i][0])-1] == -1:
        answer[int(A[i][0])-1] = int(A[i][1])
    elif answer[int(A[i][0])-1] == int(A[i][1]):
        answer[int(A[i][0])-1] = int(A[i][1])
    else:
        print(-1)
        j=j+1
        break
seisu=0
if j==0 and answer[0]==0 and N!=1:
    j=j+1
    print(-1)
if j==0 and (answer[0]==0 or answer[0]==-1) and N == 1:
    j=j+1
    print(0)
if j==0:
    for i in range(N):
        if answer[i]==-1:
            '''
            N = 5 case
            -1,7,-1,9,0
            ?7?90
            5 digits
            17090 
            '''
            if i == 0 :
                answer[0]=1
            else:
                answer[i]=0

        seisu=answer[i]*(10**(N-i-1))+seisu
    print(seisu)
def main():
    N,M,X,Y = map(int,input().split())

    x_s = list(map(int,input().split()))
    y_s = list(map(int,input().split()))

    x_max = max(x_s)
    y_min = min(y_s)

    ok = False
    for z in range(-101,101):
        #print(z)
        if x_max < z and y_min >= z and X < z and x <= Y:
            ok = True
            break
    answer =  "War" if ok else "No War"
    print(answer)





if __name__ == '__main__':
    main()


### FIXED CODE ###


def main():
    N,M,X,Y = map(int,input().split())
    x_s = list(map(int,input().split()))
    y_s = list(map(int,input().split()))

    ok = False
    for z in range(X+1,Y+1):
        if z > max(x_s) and z <= min(y_s):
            ok = True
            break

    print("No War" if ok else "War")


if __name__ == '__main__':
    main()
N = int(input())
S = input()

ans=''
for x in S:
    nc=ord(N[x])
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

### FIXED CODE ###

N = int(input())
S = input()

ans=""
for x in S:
    nc=ord(x)
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)
s_a=list(input())
s_b=list(input())
s_c=list(input())

temp =''
temp=s_a.pop(0)
while 1:
    if temp=='a':
        if s_a:
            temp=s_a.pop(0)
        else:
            print('A')
            break
    elif temp=='b':
        if s_b:
            temp=s_b.pop(0)
        else:
            print('B')
            break
    elif temp=='c':
        if s_b:
            temp=s_c.pop(0)
        else:
            print('C')
            break


### FIXED CODE ###

s_a=list(input())
s_b=list(input())
s_c=list(input())

tmp =''
tmp=s_a.pop(0)
while 1:
    if tmp=='a':
        if s_a:
            tmp=s_a.pop(0)
        else:
            print('A')
            break
    elif tmp=='b':
        if s_b:
            tmp=s_b.pop(0)
        else:
            print('B')
            break
    elif tmp=='c':
        if s_c:
            tmp=s_c.pop(0)
        else:
            print('C')
            break
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
from bisect import bisect_left, bisect_right
import random
from itertools import permutations, accumulate, combinations
import sys
import string



INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


n, k = LI()
dp = [[[0] * (n * (n + 1)) for _ in range(n + 1)] for _ in range(n + 1)]
dp[0][0][0] = 1
for i in range(n):
    for j in range(i+1):
        for l in range(k + 1):
            dp[i+1][j+1][l+2*(j+1)] += dp[i][j][l]
            dp[i + 1][j + 1][l + 2 * (j + 1)]%=mod
            dp[i+1][j][l+2*j] += dp[i][j][l]*(j*2+1)
            dp[i + 1][j][l + 2 * j] %= mod
            if j != 0:
                dp[i+1][j-1][l+(j-1)*2] += dp[i][j][l]*j*j
                dp[i + 1][j - 1][l + (j - 1) * 2]%=mod


print(dp[n][0][k])


### FIXED CODE ###

from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
from bisect import bisect_left, bisect_right
import random
from itertools import permutations, accumulate, combinations
import sys
import string



INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


n, k = LI()
dp = [[[0]*n**2*4 for _ in range(n+1)] for _ in range(n+1)]
dp[0][0][0] = 1
for i in range(n):
    for j in range(i+1):
        for l in range(k+1):
            dp[i+1][j+1][l+2*(j+1)] += dp[i][j][l]
            dp[i+1][j+1][l+2*(j+1)]%=mod
            dp[i+1][j][l+2*j] += dp[i][j][l]*(j*2+1)
            dp[i+1][j][l+2 * j] %= mod
            if j!= 0:
                dp[i+1][j-1][l+(j-1)*2] += dp[i][j][l]*j*j
                dp[i+1][j-1][l+(j-1)*2]%=mod



print(dp[n][0][k]%mod)
A = 10
B= 1
C= 2
D= 3
L = A + B
R = C + D
if L > R:
  print(Left)
elif L == R:
  print(Balanced)
else :
  print(Right)

### FIXED CODE ###

A = input().split(" ")
L = int(A[0])+int(A[1])
R = int(A[2])+int(A[3])
if L>R:
  print("Left")
elif L == R:
  print("Balanced")
else :
  print("Right")
n,k=map(int,input().split())
l = list(map(int,input().split()))
if set(l)<=k:
    print(0)
    break


### FIXED CODE ###

from collections import Counter
n,k=map(int,input().split())
A=list(map(int,input().split()))
cnt=Counter(A)
alt=sorted(cnt.values(),reverse=True)
print(sum(alt[k:]))
a,b=map(int,input.split())
if a==b:
  print('Draw')
elif a==1:
  print('Alice')
elif b==1:
  print('Bob')
elif a>b:
  print('Alice')
else:
  print('Bob')

### FIXED CODE ###

a,b=map(int,input().split())
if a==b:
  print('Draw')
elif a==1:
  print('Alice')
elif b==1:
  print('Bob')
elif a>b:
  print('Alice')
elif a<b:
  print('Bob')
n=input()
if 9 in n:
    print("Yes")
elif
    print("No")

### FIXED CODE ###

n=input()
if "9" in n:
    print("Yes")
else:
    print("No")
n , k , s = map(int,input().split())
l = []
for i in range(k):
    l.append(s)
for i in range(n-k):
    l.append(s+1)
    
if n != 1:
    print(' '.join(map(str, l)))
elif n = 1:
    print(s)

### FIXED CODE ###

n , k , s = map(int,input().split())
l = []
for i in range(k):
    l.append(s)
if s == 1:
    t = 3
elif s == 10**9:
    t = 1
else:
    t = s + 1

for i in range(n-k):
    l.append(t)


print(' '.join(map(str, l)))
n,t=input(),0

for i in range(len(n)):
  t+=int(n[i])

 print('No' if t%9 else 'Yes')


### FIXED CODE ###

n,t=input(),0

for i in range(len(n)):
  t+=int(n[i])

print('No' if t%9 else 'Yes')
A, V = map(int,input(),split())
B, W = map(int,input(),split())
T = input()
if (V <= W):
    print("NO")
elif(T < abs(A - B)/(V-W)):
    print("NO")
else:
    print("YES")


### FIXED CODE ###

A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
if (V <= W):
    print("NO")
elif(T < abs(A - B)/(V-W)):
    print("NO")
else:
    print("YES")
A,B = list(map(int,input().split()))
_ =input()
print(math.ceil((A-B)/(B-1))+1)

### FIXED CODE ###

import math
A,B = list(map(int,input().split()))
_ =input()
print(math.ceil((A-B)/(B-1))+1)