Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import numpy as np
from numba import njit


@njit('f8(i8,i8,i8,i8,f8[:,:,:])')
def get_expv(N, i, j, k, expv):
    result = 0.0
    if expv[i][j][k] != -1:
        return expv[i][j][k]
    nonlp = 1.0 - (N-i-j-k) / N
    result += 1
    if i != 0:
        result += get_expv(N, i-1, j, k, expv) * (i / N)
    if j != 0:
        result += get_expv(N, i+1, j-1, k, expv) * (j / N)
    if k != 0:
        result += get_expv(N, i, j+1, k-1, expv) * (k / N)
    result /= nonlp
    expv[i][j][k] = result
    return result

def main():
    N = int(input())

    sushi_count = {1:0, 2:0, 3:0}
    for a in map(int, input().split()):
        sushi_count[a] += 1

    expv = np.array([[[-1.0] * (sushi_count[3]+1) for i in range(N-sushi_count[1]+1)] for i in range(N+1)])

    expv[0][0][0] = 0.0

    print(get_expv(N, sushi_count[1], sushi_count[2], sushi_count[3], expv))

if __name__ == '__main__':
    main()

### FIXED CODE ###

import numpy as np
from numba import njit


@njit('f8(i8,i8,i8,i8,f8[:,:,:])')
def get_expv(N, i, j, k, expv):
    result = 0.0
    if expv[i][j][k] != -1:
        return expv[i][j][k]
    nonlp = 1.0 - (N-i-j-k) / N
    result += 1
    if i != 0:
        result += get_expv(N, i-1, j, k, expv) * (i / N)
    if j != 0:
        result += get_expv(N, i+1, j-1, k, expv) * (j / N)
    if k != 0:
        result += get_expv(N, i, j+1, k-1, expv) * (k / N)
    result /= nonlp
    expv[i][j][k] = result
    return result

def main():
    N = int(input())

    sushi_count = {1:0, 2:0, 3:0}
    for a in map(int, input().split()):
        sushi_count[a] += 1
    sh = (N+1, N-sushi_count[1]+1, sushi_count[3]+1)
    expv = np.full(sh, -1.0)

    expv[0][0][0] = 0.0

    print(get_expv(N, sushi_count[1], sushi_count[2], sushi_count[3], expv))

if __name__ == '__main__':
    main()
### BUGGY CODE ###

import math

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

A = list(map(int, input().split()))

MOD = 1000000007


def combinations(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


A.sort()

max_sum = 0
min_sum = 0
for i, a in enumerate(A):
    # max
    if i >= K - 1:
        max_sum += a * combinations(i, K - 1)

    # min
    if i <= N - K:
        min_sum += a * combinations(N - i - 1, K - 1)


print(int((max_sum - min_sum) % MOD))


### FIXED CODE ###

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

A = list(map(int, input().split()))

MOD = 1000000007


def combinations(n, r, MOD):
    if (r < 0) or (n < r):
        return 0

    r = min(r, n - r)
    return fact[n] * fact_inv[r] * fact_inv[n - r] % MOD


A.sort()
fact = [1, 1]
fact_inv = [1, 1]
inv = [0, 1]

for i in range(2, N + 1):
    fact.append((fact[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    fact_inv.append((fact_inv[-1] * inv[-1]) % MOD)

max_sum = 0
min_sum = 0

for i, a in enumerate(A):
    # max
    if i >= K - 1:
        max_sum += a * combinations(i, K - 1, MOD)

    # min
    if i <= N - K:
        min_sum += a * combinations(N - i - 1, K - 1, MOD)

print(int((max_sum - min_sum) % MOD))
### BUGGY CODE ###

n=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]

from heapq import heappop, heappush
push = lambda x,i: heappush(BB,(-x,i))
BB=[]

for i,b in enumerate(B):
  push(b,i)

ans=0
while BB:
  b,ind=heappop(BB)
  b=-b
  d=B[(ind-1)%n]+B[(ind+1)%n]
  dd=(b-A[ind])//d
  if dd==0:
    if b!=A[ind]:
      break
  else:
    ans+=dd
    b-=d*dd
    B[ind]=b
    push(b,ind)
  
print(ans if A==B else -1)


### FIXED CODE ###

n=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]

from heapq import heappop, heappush
push = lambda x,i: heappush(BB,(-x,i))
BB=[]

for i,b in enumerate(B):
  push(b,i)

ans=0
while BB:
  b,ind=heappop(BB)
  b,ai=-b,A[ind]
  if b<ai:
    ans=-1
    break
  d=B[(ind-1)%n]+B[(ind+1)%n]
  dd=(b-ai)//d
  if dd==0:
    if b==ai:
      continue
    ans=-1
    break
  ans+=dd
  B[ind]-=d*dd
  push(b-d*dd,ind)
  
print(ans)
### BUGGY CODE ###

import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n,m=LI()
  if m%n==0:
    return m//n

  ans=0
  for i in range(1,m//n+1):
    if m%i==0:
      ans=i
  
  return ans

# main()
print(main())


### FIXED CODE ###

import math,itertools,fractions,heapq,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n,m=LI()

  if n==1:
    return m

  a=0
  for i in range(1,int(math.sqrt(m))+1):
    if m%i==0:
      if m>=i*n:
        a=max(a,i)
      if m>=m//i*n:
        a=max(a,m//i)

  return a

# main()
print(main())
### BUGGY CODE ###

from collections import Counter
mod = 2019
S = input()
N = len(S)

S = S[::-1]
A = []
for i in range(N):
    s = int(S[i])*pow(10,i)
    A.append(s%mod)
B = [0]
for i in range(N):
    s = B[i]+A[i]
    B.append(s%mod)

C = Counter(B)
ans = 0
for key in C.keys():
    m = C[key]
    ans += m*(m-1)//2
print(ans)

### FIXED CODE ###

S = input()

from collections import defaultdict
mod = 2019
N = len(S)
D = defaultdict(int)
S = S[::-1]
ans = 0
T = 0
D[0]+=1
for i in range(N):
    s = int(S[i])*pow(10,i,mod)
    T = (T+s)%mod
    ans += D[T]
    D[T]+=1
print(ans)
### BUGGY CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math



N = int(input())
tn,an = [1,1]
for _ in range(N):
  t,a = map(int, input().split())
  idx = 1
  while t*idx < tn or a*idx < an:
    idx += 1
  tn,an = [t*idx,a*idx]
print(tn+an)

### FIXED CODE ###

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math
import decimal


N = int(input())
tn,an = [1,1]
for _ in range(N):
  t,a = map(int, input().split())
  x = max(math.ceil(decimal.Decimal(tn)/decimal.Decimal(t)),math.ceil(decimal.Decimal(an)/decimal.Decimal(a)))
  tn,an = [t*x,a*x]
print(tn+an)
### BUGGY CODE ###

n,m=map(int,input().split())
a=[list(map(int,input().split())) for i in range(m)]
ikeruheya = [[] for i in range(n)]
ans = [0]*n

ans[0]=1

for i in range(m):
    ikeruheya[a[i][0]-1].append(a[i][1])
    ikeruheya[a[i][1]-1].append(a[i][0])


next=[1]

while len(next):
    imaheya = next.pop(0)-1
    for j in range(len(ikeruheya[imaheya])):
        if ans[ikeruheya[imaheya][j]-1]==0:
            ans[ikeruheya[imaheya][j]-1]= imaheya + 1           
            next.append(ikeruheya[imaheya][j])
            #ikeruheya[[imaheya-1][j]-1].remove(imaheya)
        

print("Yes")
for i in range(1, n):
    print(ans[i])


#b=ikeruheya
#michi=ans
#heya=next
#now=imaheya-1
    


### FIXED CODE ###

from collections import deque
n,m = map(int,input().split())
a=[list(map(int, input().split())) for i in range(m)]
b=[[] for j in range(n)] 

michi=[-1]*(n)
michi[0]=0
heya=[]


for i in range(m):
    b[a[i][0]-1].append(a[i][1])
    b[a[i][1]-1].append(a[i][0])



heya.append(1)


while len(heya):
    now=heya.pop(0)-1
    
    for i in range(len(b[now])):
        if michi[b[now][i]-1] == -1:
            heya.append(b[now][i])
            michi[b[now][i]-1] = now+1
print("Yes")
for i in range(1,n):
    print(michi[i])
### BUGGY CODE ###


import sys
sys.setrecursionlimit(1000000)

from collections import defaultdict

def inc(tree, point, p, x):
    # 自分
    point[p] += x
    if tree[p] == -1:
        return

    for child in tree[p]:
        inc(tree, point, child, x)


N, Q = map(int, input().split())

tree = [-1] * (N+1)
point = [0] * (N+1)

for i in range(N-1):
    a, b = map(int, input().split())
    if tree[a] == -1:
        tree[a] = [b]
    else:
        tree[a] += [b]

dd = defaultdict(int)
for i in range(Q):
    p, x = map(int, input().split())
    dd[p] += x

for p, x in dd.items():
    inc(tree, point, p, x)

point.pop(0)
print(*point)


### FIXED CODE ###


import sys
input = sys.stdin.readline #for input speed
sys.setrecursionlimit(10**6) #for deep recursion
n, q = map(int, input().split())

tree_index = [[] for _ in range(n)]
for i in range(n-1):
  a,b = map(int, input().split())
  a -= 1
  b -= 1
  tree_index[a].append(b) # a<bとは限らないため、双方向にする
  tree_index[b].append(a)

#print(tree_index)


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

def dfs(cur, par):
    for chl in tree_index[cur]:
      if chl == par: #parentとchildが等しい時はスキップ
        continue
      ans[chl] += ans[cur]
      dfs(chl, cur)
dfs(0, -1)
print(*ans)
### BUGGY CODE ###

n=int(input())
k=int(input())
count=0
for i in range(10**(k-1),n+1):
  s=str(i)
  n=len(s)
  if n-s.count('0')==k:
    count+=1
print(count)

### FIXED CODE ###

N = int(input())
K = int(input())

strN = str(N)
maxD = len(strN)

dp = [[[0]*(K+1) for j in range(2)] for i in range(maxD+1)]
dp[0][0][0] = 1
for d, Nd in enumerate(strN):
    Nd = int(Nd)
    for isLeN in range(2):
        for m in range(K+1):
            x = 0
            if not isLeN and x > Nd: continue
            isLeN2 = isLeN or x < Nd
            dp[d+1][isLeN2][m] += dp[d][isLeN][m]
            for x in range(1, 10):
                if not isLeN and x > Nd: continue
                isLeN2 = isLeN or x < Nd
                m2 = m+1
                if m2 > K: continue
                dp[d+1][isLeN2][m2] += dp[d][isLeN][m]
#    print(d+1, Nd, dp[d+1])

#print(dp[-1])
print(dp[-1][0][K]+dp[-1][1][K])
### BUGGY CODE ###

N = int(input())
P = input().split()
P = [int(p) for p in P]

ans = N
for i, p in enumerate(P):
  for j in range(0,i+1):
    if P[i] > P[j]:
      ans -=1
      break
print(ans)

### FIXED CODE ###

N = int(input())
P = input().split()
P = [int(p) for p in P]

ans = N
min_p = P[0]
for p in P[1:N]:
  if min_p > p:
    min_p = p
  else:
    ans -=1
print(ans)
### BUGGY CODE ###

N = int(input())
A = tuple(input().split())
B = []
 
for x in range(1,N+1):
    B.append(A.index(str(x)) + 1)
print(*B)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
B = [0] * (N +1)

for i in range(N):
    B[A[i]] = i+1

print(*B[1:])
### BUGGY CODE ###

import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n, k = i_map()
    p = i_list()

    l = []
    dic = {}

    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    for i in p:
        l.append(sowa[i]/i)

    ans = 0
    for i in range(n-k+1):
        ans = max(ans,sum(l[i:i+k]))
    print(ans)



if __name__=="__main__":
    main()


### FIXED CODE ###

import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans)


if __name__=="__main__":
    main()
### BUGGY CODE ###



n=int(input())

a=sorted(list(map(int,input().split())),reverse=True)

s=[]
t=[]
for i in a:
    if i not in s:
        s.append(i)
    else:
        t.append(i)
        s=[]
    if len(t)==2:
        break


try:
    print(t[0]*t[1])
except:
    print(0)

### FIXED CODE ###

n=int(input())

a=sorted(list(map(int,input().split())),reverse=True)

stack=-1
t=[]
for i in a:
    if stack==i:
        t.append(i)
        stack=-1
    else:
        stack=i
    
    if len(t)>=2:
        break
try:
    print(t[0]*t[1])
except:
    print(0)
### BUGGY CODE ###

import itertools
n, x, y = map(int, input().split())
x -= 1
y -= 1
list1 = [[0 for i in range(n)] for j in range(n)]

for i in range(n):
    for j in range(n):
        if list1[j][i] != 0:
            continue
        
        num = min([abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(x - j)])
        list1[i][j] = num

list2 = list(itertools.chain.from_iterable(list1))

for k in range(1,n):
    print(list2.count(k))

### FIXED CODE ###

n, x, y = map(int, input().split())
x -= 1
y -= 1

cnt_list = [0] * (n - 1)

for i in range(n):
    for j in range(n):
        if j <= i:
            continue
        
        #i < j,x < yのとき、i→y→x→jが最短になることはない
        num = min([j - i, abs(x - i) + 1 + abs(y - j)]) - 1 #距離 - 1、距離ゼロはif文で排除
        cnt_list[num] += 1

for n in cnt_list:
    print(n)
### BUGGY CODE ###

from math import floor
N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
while M>0:
    A[-1] /= 2
    M-=1
    i = -1
    while i != -N and A[i]<A[i-1]:
        A[i],A[i-1] = A[i-1],A[i]
        i-=1
print(sum(map(floor, A)))


### FIXED CODE ###

from math import ceil
from heapq import heapify, heappop, heappush
N,M = map(int, input().split())
A = list(map(lambda x: int(x)*(-1), input().split()))
heapify(A)
while M>0:
    temp = heappop(A)
    heappush(A, temp/2)
    M-=1
print(-sum(map(ceil, A)))
### BUGGY CODE ###

N, M = map(int, input().split())
S = input()
T = input()


def gcd(a, b):

    return a if b == 0 else gcd(b, a % b)


def lcm(a, b):
    return a * b // gcd(b, a % b)


L = lcm(N, M)

r = ["*" for i in range(L)]
s = 0
t = 0
f = False

s_step = L // N
t_step = L // M
i = 0
j = 0
while s < L:
    r[s] = S[i]
    s += s_step
    i += 1

while t < L:
    if r[t] == T[j]:
        t += t_step
        j += 1
        continue
    elif r[t] == "*":
        r[t] = T[j]
        t += t_step
        j += 1
    else:
        f = True
        break
if f:
    print(-1)
else:
    print(L)


### FIXED CODE ###

N, M = map(int, input().split())
S = input()
T = input()
# def gcd(a, b):
#     if a < b:
#         return gcd(b, a)
#     else:
#         return a if b == 0 else gcd(b, a % b)

import fractions
def lcm(a, b):
    return a * b // fractions.gcd(b, a % b)


L = lcm(N, M)

f = False

s_step = L // N
t_step = L // M
sL = lcm(s_step, t_step)
s = 0
t = 0

for i in range(0, L, sL):
    if i == 0:
        if S[i] == T[i]:
            continue
        else:
            f = True
            break
    else:
        s = i // s_step
        t = i // t_step
        if s > N - 1:
            break
        if t > M - 1:
            break
        if S[s] == T[t]:
            continue
        else:
            f = True
            break

if f:
    print(-1)
else:
    print(L)
### BUGGY CODE ###

#D問題
N,K=map(int,input().split())
S=str(input())
Slist=list(S)
#偶数が”1”
hu=[]
ima=""
imal=0
for i in range(N):
    if i == 0:
        ima=Slist[0]
        imal=1
        if Slist[0] == "0":
            hu.append(0)
    else:
        if ima==Slist[i]:
            imal+=1
        else:
            hu.append(imal)
            ima=Slist[i]
            imal=1
hu.append(imal)
Ngu=len(hu)
MAX=0
for i in range(Ngu):
    I=i
    kari=0
    k=0
    for j in range(Ngu):
        J=I+j
        if J == Ngu:
            break    
        if J%2==0:
            kari+=hu[J]
        else:
            if k<K:
                kari+=hu[J]
                k+=1
            else:
                break
    MAX=max(MAX,kari)
print(MAX)
            

### FIXED CODE ###

#D問題
N,K=map(int,input().split())
S=str(input())
Slist=list(S)
#偶数が”1”
hu=[]
ima=""
imal=0
for i in range(N):
    if i == 0:
        ima=Slist[0]
        imal=1
        if Slist[0] == "0":
            hu.append(0)
    else:
        if ima==Slist[i]:
            imal+=1
        else:
            hu.append(imal)
            ima=Slist[i]
            imal=1
hu.append(imal)
Ngu=len(hu)
rui=[0]
for i in range(Ngu):
    if i == 0:
        rui.append(hu[0])
    else:
        karui=rui[i]+hu[i]
        rui.append(karui)

        
MAX=0

for i in range(Ngu+1):
    if i%2==0:
        if 2*K+i-1<Ngu+1:
            if i > 0:
                kari=rui[2*K+i-1]-rui[i-1]
            else:
                kari=rui[2*K+i-1]
        else:
            if i > 0:
                kari=rui[-1]-rui[i-1]
            else:
                kari=rui[-1]
    else:
        if 2*K+i<Ngu+1:
            if i > 0:
                kari=rui[2*K+i]-rui[i-1]
            else:
                kari=rui[2*K+i]
        else:
            if i > 0:
                kari=rui[-1]-rui[i-1]
            else:
                kari=rui[-1]
    MAX=max(kari,MAX) 
print(MAX)
### BUGGY CODE ###

K = int(input())

p = 0
for i in range(100000000):
    p = (p*10+7) % K
    if p == 0:
        print(i+1)
        exit()
print(-1)



### FIXED CODE ###


K = int(input())

p = 0
for i in range(100000000):
    p = (p*10+7) % K
    if p == 0:
        print(i+1)
        exit()
print(-1)
### BUGGY CODE ###

MAX_VAL = 10 ** 18

N = int(input())
A = list(map(int, input().split()))

if 0 in A:
    print(0)
    exit()

ans = 1
for a in A:
    ans *= a

if ans > MAX_VAL:
    print(-1)
else:
    print(ans)


### FIXED CODE ###

MAX_VAL = 10 ** 18

N = int(input())
A = list(map(int, input().split()))

if 0 in A:
    print(0)
    exit()

ans = 1
for i, a in enumerate(A):
    if i == 0:
        ans = a
    else:
        ans *= a

    if ans > MAX_VAL:
        print(-1)
        exit()

print(ans)
### BUGGY CODE ###

from collections import Counter

def main():
    N = int(input())
    V = list(map(int, input().split()))
    V1 = []
    V2 = []
    for i in range(0,len(V),2):
        V1.append(V[i])
    for i in range(1,len(V),2):
        V2.append(V[i])  
    VC1 = Counter(V1)
    VC2 = Counter(V2)
    count = 0
    for i in range(1,len(VC1)):
        count += VC1.most_common()[i][1]
    for i in range(1,len(VC2)):
        count += VC2.most_common()[i][1]
    if str(VC1.most_common()[0][0]) == str(VC2.most_common()[0][0]) and len(VC1)==1:
        count += VC1.most_common()[0][1]
    elif  str(VC1.most_common()[0][0]) == str(VC2.most_common()[0][0]):
        vc1sa = VC1.most_common()[0][1] - VC1.most_common()[1][1]
        vc2sa = VC1.most_common()[0][1] - VC1.most_common()[1][1]
        count += min([vc1sa,vc2sa])


    print(count)




if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter

def main():
    N = int(input())
    V = list(map(int, input().split()))
    V1 = []
    V2 = []
    for i in range(0,len(V),2):
        V1.append(V[i])
    for i in range(1,len(V),2):
        V2.append(V[i])  
    VC1 = Counter(V1)
    VC2 = Counter(V2)
    count = 0

    VC1mosc = VC1.most_common()[0][0]
    VC1mosv = VC1.most_common()[0][1]
    VC2mosc = VC2.most_common()[0][0]
    VC2mosv = VC2.most_common()[0][1]

    count += len(V1) - VC1mosv
    count += len(V2) - VC2mosv

    if VC1mosc  == VC2mosc and len(VC1)==1:
        count += VC1mosv
    elif  VC1mosc  == VC2mosc:
        vc1sa = VC1mosv - VC1.most_common()[1][1]
        vc2sa = VC2mosv - VC2.most_common()[1][1]
        count += min([vc1sa,vc2sa])


    print(count)




if __name__ == '__main__':
    main()
### BUGGY CODE ###

N,C,K = map(int,input().split())
T = [int(input()) for i in range(N)]

T.sort()
i = 0
ans = 0

while i < N:
    t = T[i]
    x = T.count(T[i])
    ans = ans + (x-1+C)//C
    for j in range(i+((x-1+C)//C-1)*C,N):
        if T[j]>t+K:
            y = j-i
            break
        y = N-i
            
    y=min(C,y)
    i = i + y 

print(ans)

### FIXED CODE ###

N,C,K = map(int,input().split())
T = [int(input()) for i in range(N)]

T.sort()
i = 0
ans = 0
time =0
p = 0

for i in range(N):
 
    if  p==0 or p ==C:
        ans = ans+1
        p =1
        time =T[i]+K
    elif p<C :
        if T[i]<=time:
            p +=1
        elif T[i]>time:
            ans =ans+1
            time=T[i]+K
            p =1

print(ans)
### BUGGY CODE ###

from collections import namedtuple
Line = namedtuple('Line', ['lowest', 'end'])


def main():
    N = int(input())
    up_lines = []
    down_lines = []
    for i in range(N):
        s = input()
        now = 0
        lowest = 0
        for c in s:
            if c == "(":
                now += 1
            else:
                now -= 1
                lowest = min(lowest, now)
        if now > 0:
            up_lines.append(Line(lowest, now))
        else:
            down_lines.append(Line(lowest-now, -now))
    up_lines.sort(key=lambda line: -line.end)
    up_lines.sort(key=lambda line: -line.lowest)
    down_lines.sort(key=lambda line: -line.end)
    down_lines.sort(key=lambda line: -line.lowest)
    left = 0
    for line in up_lines:
        if left + line.lowest < 0:
            print("No")
            return
        left += line.end
        if left < 0:
            print("No")
            break
    right = 0
    for line in down_lines:
        if right + line.lowest < 0:
            print("No")
            return
        right += line.end
        if right < 0:
            print("No")
            break
    if left == right:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import namedtuple
Line = namedtuple('Line', ['lowest', 'end'])


def main():
    N = int(input())
    up_lines = []
    down_lines = []
    for i in range(N):
        s = input()
        now = 0
        lowest = 0
        for c in s:
            if c == "(":
                now += 1
            else:
                now -= 1
                lowest = min(lowest, now)
        if now > 0:
            up_lines.append(Line(lowest, now))
        else:
            down_lines.append(Line(lowest-now, -now))
    up_lines.sort(key=lambda line: -line.lowest)
    down_lines.sort(key=lambda line: -line.lowest)
    left = 0
    for line in up_lines:
        if left + line.lowest < 0:
            print("No")
            return
        left += line.end
        if left < 0:
            print("No")
            break
    right = 0
    for line in down_lines:
        if right + line.lowest < 0:
            print("No")
            return
        right += line.end
        if right < 0:
            print("No")
            break
    if left == right:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
### BUGGY CODE ###

N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]

def print_ans(lst):
    for l in lst:
        if l:
            print("Yes")
        else:
            print("No")
    exit()

hp = K - Q

if hp > 0:
    #はじめから全員Yes
    tmp = [True] * N
    print_ans(tmp)
else:
    tmp = []
    for i in range(N):
        if hp + A.count(i+1) > 0:
            tmp.append(True)
        else:
            tmp.append(False)
    print_ans(tmp)

### FIXED CODE ###

N, K, Q = map(int, input().split())
A = [int(input()) for _ in range(Q)]
correct = [0] * N

for a in A:
    correct[a-1] += 1

hp = Q - K
for i in range(N):
    if correct[i] > hp:
        print("Yes")
    else:
        print("No")