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

N = raw_input()
counter = 0
color_array = []
color_array.append(int(raw_input()))
while counter < int(N)-1:
  newNum = int(raw_input())
  checker = 0
  listlength = len(color_array)
  while checker < listlength:
    if newNum > color_array[checker]:
      color_array[checker] = newNum
      break
    checker += 1
  if checker == listlength:
    color_array.append(newNum)
  counter += 1
  
print len(color_array)

### FIXED CODE ###

import bisect
n = input()
aa = []
xx = [-input()]
for _ in xrange(n - 1):
    aa.append(-input())
for a in aa:
    if a >= xx[-1]:
        xx.append(a)
    else:
        i = bisect.bisect_right(xx, a)
        if i == len(xx):
          i -= 1
        xx[i] = a
print len(xx)
### BUGGY CODE ###

N = int(input())
A = []
for _ in range(3):
  a = list(map(int, input().split()))
  a.sort()
  A.append(a)

ans = 0
for b in A[1]:
  a = sum(x<b for x in A[0])
  c = sum(x>b for x in A[2])
  ans += a * c
print(ans)

### FIXED CODE ###

import bisect
N = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
A.sort()
C.sort()

ans = 0
for i in range(N):
  b = B[i]
  a = bisect.bisect_left(A, b)
  c = N - bisect.bisect_right(C, b)
  ans += a * c
print(ans)
### BUGGY CODE ###

#!/usr/bin/env python

import collections

E = "E"  # ->
W = "W"  # <-

n = int(input().rstrip())

line = input().rstrip()

min_change_count = float('inf')

for i in range(n):
    w_line = line[0:i]
    e_line = line[i+1:] if i < n else []

    change_count = 0
    change_count += collections.Counter(w_line)[W]
    change_count += collections.Counter(e_line)[E]

    min_change_count = change_count if change_count < min_change_count else min_change_count


print(min_change_count)


### FIXED CODE ###

E = "E"  # ->
W = "W"  # <-

n = int(input().rstrip())

line = input().rstrip()

bef_change_count = line[1:].count(E)
min_change_count = bef_change_count

for leader_i in range(1, n):
    change_count = bef_change_count
    if line[leader_i] == E and line[leader_i - 1] == E:
        change_count -= 1
    elif line[leader_i] == W and line[leader_i - 1] == W:
        change_count += 1

    bef_change_count = change_count
    min_change_count = min(change_count, min_change_count)

print(min_change_count)
### BUGGY CODE ###

N, K = map(int, input().split())
As = list(map(int, input().split()))
base = []
for n in range(K, N+1):
    start = n-K
    ans = 1
    for a in As[start:n]:
        ans *= a
    base.append(ans)
for n in range(len(base)-1):
    if base[n+1] > base[n]:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

N, K = map(int, input().split())
As = list(map(int, input().split()))
ans2=0
for n in range(K+1, N+1):
    ans1 = As[n-K-1]
    ans2 = As[n-1]
    if ans1 < ans2:
        print("Yes")
    else:
        print("No")
### BUGGY CODE ###

import sys
sys.setrecursionlimit(500000)
def input() -> str:
    return sys.stdin.readline().rstrip()
mod = 10**9 + 7
def dp(i):
    if i == n - 1:
        return 1
    if i == n - 2:
        return 2 - int(n - 1 in a)
    if memo[i] != -1:
        return memo[i]
    memo[i] = (dp(i + 1) * int(i + 1 not in a) % mod + dp(i + 2) * int(i + 2 not in a) % mod) % mod
    return memo[i]
n, m = [int(i) for i in input().split()]
a = [int(input()) for _ in range(m)]
memo = [-1] * n
print(dp(0))

### FIXED CODE ###

import sys
def input():
  return sys.stdin.readline().rstrip()
mod = 10**9 + 7
n, m = [int(i) for i in input().split()]
a = [int(input()) for _ in range(m)]
notin = [1] * n
for i in a:
  notin[i] = 0
dp = [0] * n
dp[n - 1] = 1
if n > 1:
	dp[n - 2] = 1 + notin[n - 1]
for i in range(n - 3, -1, -1):
  dp[i] += dp[i + 1] * notin[i + 1] % mod
  dp[i] += dp[i + 2] * notin[i + 2] % mod
  dp[i] %= mod
print(dp[0])
### BUGGY CODE ###

import numpy as np
import sys


def main():
    input = sys.stdin.readline
    N, W = map(int, input().split())
    w = [0] * N
    v = [0] * N
    for i in range(N):
        w[i], v[i] = map(int, input().split())
    dp = np.zeros((N + 1, W + 1), dtype=np.int64)
    for i in range(N):
        for r_w in range(W + 1):
            if (r_w >= w[i]):
                dp[i + 1][r_w] = max(dp[i][r_w - w[i]] + v[i], dp[i][r_w])
            else:
                dp[i + 1][r_w] = dp[i][r_w]
    print(dp[N][W])


if __name__ == "__main__":
    main()


### FIXED CODE ###

import numpy as np
import sys


def main():
    input = sys.stdin.readline
    n, W = map(int, input().split())
    w, v = [0] * n, [0] * n
    for i in range(n):
        w[i], v[i] = map(int, input().split())
    ndp = np.zeros(W + 1, dtype=np.int64)
    for w, v in zip(w, v):
        np.maximum(ndp[:-w] + v, ndp[w:], out=ndp[w:])
    print(ndp[-1])


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

W,H=map(int,input().split())
p=[]
q=[]
for i in range(W):
  p.append(int(input()))
for i in range(H):
  q.append(int(input()))
ans=sum(p)*(H+1)+sum(q)*(W+1)
for i in range(W):
  for j in range(H):
    ans-=max(p[i],q[j])
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline

W,H=map(int,input().split())
p=sorted(int(input()) for i in range(W))
q=sorted(int(input()) for i in range(H))
ans=sum(p)*(H+1)+sum(q)*(W+1)
for i in range(W+H):
  if p[len(p)-1]>=q[len(q)-1]:
    ans-=p[len(p)-1]*len(q)
    p.pop()
    if p==[]:
      print(ans)
      exit()
  else:
    ans-=q[len(q)-1]*len(p)
    q.pop()
    if q==[]:
      print(ans)
      exit()
### BUGGY CODE ###

s =  list(input())

ret = 0
while True :
    tmp = 0
    i = 0
    while i < len(s) :
        if s[i:i+3] != ['A', 'B', 'C'] :
            i += 1
            continue
        else :
            s[i:i+3] = ['B', 'C', 'A']
            i += 3
            tmp += 1
    if tmp :
        ret += tmp
    else :
        break

print(ret)

### FIXED CODE ###

s =  list(input())

ret = 0
i = 0
a = 0
bc = 0

while True :
    while i < len(s) and s[i] == 'A' :
        a += 1
        i += 1

    while i < len(s) - 1 and s[i:i+2] == ['B', 'C']  :
        bc += 1
        i += 2

    ret += a * bc

    bc = 0

    if i < len(s) and s[i] != 'A' :
        a = 0
        
    while i < len(s) and s[i] != 'A' :
        i += 1

    if i >= len(s) - 1 :
        break
    

print(ret)
### BUGGY CODE ###

# D - Ki TLE
import sys
sys.setrecursionlimit(10**6)
N,Q = map(int,input().split())

# 有向グラフ
G = [[] for _ in range(N)]
root = set()
for _ in range(N-1):
    a, b = map(int, input().split())
    a -= 1; b -= 1
    if not(b in root):
        G[a].append(b)
    # b が根と繋がっているとき
    else:
        G[b].append(a)
    if a == 0:
        root.add(b)

lst = []
for _ in range(Q):
    P,X = map(int,input().split())
    P-=1
    lst.append((P,X))

seen = [False]*N
cnt = [0]*N
def dfs(v,point,seen):
    seen[v] = True# v を訪問済みにする
    cnt[v] += point
    # v から行ける各頂点 next_v について
    for next_v in G[v]:
        # next_v が探索済みならスルー
        if seen[next_v] == True:
             continue
        dfs(next_v,point,seen)

for p,x in lst:
    seenC = seen.copy()
    dfs(p,x,seenC)
print(*cnt)

### FIXED CODE ###

# D - Ki TLE
import sys
sys.setrecursionlimit(10**7)
N,Q = map(int,input().split())

# 有向グラフ
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    a -= 1; b -= 1
    G[a].append(b)
    G[b].append(a)
    
lst = []
for _ in range(Q):
    P,X = map(int,input().split())
    P-=1
    lst.append((P,X))

cnt = [0]*N
for p,x in lst:
    cnt[p] += x 
    
seen = [False]*N
def dfs(v):
    seen[v] = True# v を訪問済みにする
    # v から行ける各頂点 next_v について
    for next_v in G[v]:
        # next_v が探索済みならスルー
        if seen[next_v] == True:
             continue
        cnt[next_v] += cnt[v] 
        dfs(next_v)
dfs(0)
print(*cnt)
### BUGGY CODE ###

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

for i in range(N):
  M[i]=M[i]-(i+1)


min=10**14
for i in range(N):
  sum=0
  p=M[i]
  for j in range(N):
      sum=sum+abs(M[j]-p)
  if sum<min:
    min=sum

print(min)



### FIXED CODE ###

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

for i in range(N):
  M[i]=M[i]-(i+1)

M.sort()

if N%2==0:
  p=int((M[int(N/2)-1]+M[int(N/2)])/2)
else:
  p=M[int((N+1)/2)-1] 

sum=0
for i in range(N):
  sum=sum+abs(M[i]-p)

  
print(sum)
### BUGGY CODE ###

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

count = [0] * n

for x in range(n):
    count[a[x]-1] += 1

count.sort()
length = len(count)

for x in range(length):
    if len(count[x:]) == k:
        break

print(sum(count[:x]))


### FIXED CODE ###

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

count = [0] * n

for x in range(n):
    count[a[x]-1] += 1

count.sort()
length = len(count)

print(sum(count[:length - k]))
### BUGGY CODE ###

N = int(input())
H = list(map(int, input().split()))
def move_right(i):
    count = 0
    for j in range(i, N-1):
        if H[j+1]<=H[j]:
            count += 1
        else:
            break
    return count

answer=0

for i in range(N-1):
    answer=max(answer,move_right(i))

print(answer)


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
count = 0
answer = 0
for j in range(N-1):
    if H[j+1] <= H[j]:
        count += 1
    else:
        answer = max(count, answer)
        count = 0
answer = max(count, answer)
print(answer)
### BUGGY CODE ###

H,N=map(int,input().split())
ab=[list(map(int,input().split()))for _ in range(N)]
from heapq import*

count=[0]+[1]*H
ans=[10**9]*(H+1)
ans[0]=0
que=[0]
heapify(que)
while que:
    x=heappop(que)
    for a,b in ab:
        a=min(a,H-x)
        if ans[x+a]>ans[x]+b:
            ans[x+a]=ans[x]+b
            if count[x+a]:
                heappush(que,x+a)
                count[x+a]=0

print(ans[H])

### FIXED CODE ###

H,N=map(int,input().split())
ab=[list(map(int,input().split()))for _ in range(N)]
ab.sort()

ans=[10**9]*(H+1)
ans[0]=0
i=0
while i<=H:
    for a,b in ab:
        if a+i>H:
            a=H-i
        if ans[i+a]>ans[i]+b:
            ans[i+a]=ans[i]+b
    i+=1

print(ans[H])
### BUGGY CODE ###

n,k =map(int,input().split())
test = n
while True:
  zet = abs(test-k)
  if zet == 0:
    print(zet)
    break
  if zet > test:
    print(test)
    break
  test = zet

### FIXED CODE ###

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

syou = n//k

zet = abs(n-k*syou)
if zet == 0:
  print(zet)
else:
  zet1 = abs(n-k*(syou+1))
  if zet > zet1:
    print(zet1)
  else: 
    print(zet)
### BUGGY CODE ###

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, _, W = MAP()
A = [W] + LIST()

# memo[i][j] := 先手が最後にi枚目、後手が最後にj枚目を取った状態
memo = list2d(N+1, N+1, None)
def rec(a, b):
    if memo[a][b] is not None:
        return memo[a][b]
    # 終了条件(どちらかが最後まで札を取った)
    if a == N or b == N:
        res = abs(A[a]-A[b])
        memo[a][b] = res
        return res
    nxt = max(a, b)
    turn = 0 if a < b else 1
    if turn % 2 == 0:
        res = -INF
        for i in range(nxt+1, N+1):
            res = max(res, rec(i, b))
    else:
        res = INF
        for i in range(nxt+1, N+1):
            res = min(res, rec(a, i))
    memo[a][b] = res
    return res

ans = rec(-1, 0)
print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

"""
参考：https://kimiyuki.net/writeup/algo/atcoder/arc-085-d/
・ミニマックス法
・メモ化再帰
・先手と後手にそれぞれのメモを作る
"""

import sys
from collections import defaultdict

# 再帰呼び出しの回数制限(デフォルト1000)
sys.setrecursionlimit(10 ** 9)
 
N, Z, W = map(int, input().split())
aN = list(map(int, input().split()))

# 先手番用メモ[残り山札数][相手のスコア] = このルートでのmax
# 後手番用メモ[残り山札数][相手のスコア] = このルートでのmin
memo1 = [defaultdict(int) for _ in range(N+1)]
memo2 = [defaultdict(int) for _ in range(N+1)]

def dfs(turn, rest, x, y):
    if rest == 0:
        return abs(x - y)
    # 先手番
    if turn % 2 == 0:
        # 既に見た局面ならメモの内容を返す
        if memo1[rest][y]: 
            return memo1[rest][y]
        mx = -1
        for i in range(N-rest, N):
            x = aN[i]
            idx = i+1
            mx = max(dfs(turn+1, N-idx, x, y), mx)
        # ここより深い所を探し終わったので結果をメモする
        memo1[rest][y] = mx
        return mx
    # 後手番
    else:
        if memo2[rest][x]: 
            return memo2[rest][x]
        mn = float('inf')
        for i in range(N-rest, N):
            y = aN[i]
            idx = i+1
            mn = min(dfs(turn+1, N-idx, x, y), mn)
        memo2[rest][x] = mn
        return mn

print(dfs(0, N, Z, W))
### BUGGY CODE ###

n = int(input())
a = [int(x) for x in input().split()]
m = 1;
for i in range(n):
  m *= a[i];
if m > 1e+18: print(-1)
else: print(m)

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]
if 0 in a: print(0)
else:
    m = 1
    flag = 0
    for i in a:
        m *= i
        if m > 1e+18:
            print(-1)
            flag = 1
            break
    if flag == 0: print(m)
### BUGGY CODE ###

# -*- coding: utf-8 -*-
 
N, K = map(int, input().split())
 
h = list(map(int, input().split()))
 
dp = [0]
 
for n in range(1, N):
    temp = float("inf")
    for k in range(1,K+1):
        if n-k < 0:
            break
        temp = min(dp[n-k] + abs(h[n]-h[n-k]), temp)
    dp += [temp]
#print(dp)
print(dp[N-1])

### FIXED CODE ###

# -*- coding: utf-8 -*-

import numpy as np

N, K = map(int, input().split())
 
h = np.array(list(map(int, input().split())))
 
dp = np.zeros(N)
 
for n in range(1, N):
    k = min(K, n)
    temp = np.min(dp[n-k:n] + np.abs(h[n]-h[n-k:n]))
    dp[n] = temp
print(int(dp[-1]))
### BUGGY CODE ###

a, b, k = map(int, input().split())
for i in range(k):
    if a > 0:
        a -= 1
    elif a == 0 and b > 0:
        b -= 1
    elif a == 0 and b == 0:
        break

print(a, b)

### FIXED CODE ###

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

if a + b <= k:
    a = 0
    b = 0
elif a + b > k and a >= k:
    a = a - k
elif a < k:
    b = b - abs(a - k)
    a = 0

print(a, b)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

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

yakusu = []
for i in range(1,int(sumA**0.5)+1):
    if sumA%i==0:
        yakusu.append(i)
        if sumA//i!=i:
            yakusu.append(sumA//i)
yakusu.sort(reverse=True)

for x in yakusu:
    tmp = list(map(lambda y: y%x, A))
    tmp.sort()
    for i in range(N):
        minuscnt = sum(tmp[:i+1])
        pluscnt = x*(N-i-1)-sum(tmp[i+1:])
        if minuscnt%x == pluscnt%x and K >= max(minuscnt,pluscnt):
            print(x)
            sys.exit()


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

yakusu = []
for i in range(1,int(sumA**0.5)+1):
    if sumA%i==0:
        yakusu.append(i)
        if sumA//i!=i:
            yakusu.append(sumA//i)
yakusu.sort(reverse=True)

for x in yakusu:
    tmp = list(map(lambda y: y%x, A))
    tmp.sort()
    for i in range(N):
        minuscnt = sum(tmp[:i+1])
        pluscnt = x*(N-i-1)-sum(tmp[i+1:])
        if minuscnt%x == pluscnt%x and K >= max(minuscnt,pluscnt):
            print(x)
            sys.exit()
### BUGGY CODE ###

N, Q = [int(i) for i in input().split()]
S = input()
a_n = [[int(i) for i in input().split()] for Q in range(Q)]

for a in a_n:
    print(S[a[0]-1:a[1]].count('AC'))
    

### FIXED CODE ###

N,Q = map(int, input().split())
S = input()
range_list = [list(map(int, input().split())) for _ in range(Q)]
 
ac_counter = [0]
# acという文字列をカウントしておくlistを作成
for i in range(1,N):
    ac_counter.append(ac_counter[i-1]+1 if S[i-1:i+1] == 'AC' else ac_counter[i-1])
# 上で作ったリストを使い範囲内に何個あるのか確認
for range_list in range_list:
    print(ac_counter[range_list[1]-1] - ac_counter[range_list[0]-1])
### BUGGY CODE ###

N,K = list(map(int, input().split()))
p = list(map(int, input().split()))
p2 = [p[i]*0.5 + 0.5 for i in range(N)]
max = 0

for i in range(N-K+1):
    tmp = sum(p2[i:i+K])
    if max < tmp:
        max = tmp
print('{:.12f}'.format(max))


### FIXED CODE ###

N,K = list(map(int, input().split()))
p = list(map(int, input().split()))
p2 = [p[i]*0.5 + 0.5 for i in range(N)]
size = N + 1
cusum = [0] * size
max = 0

for i in range(N):
    cusum[i+1] = cusum[i] + p2[i]

for i in range(N-K+1):
    tmp = cusum[i+K] - cusum[i]
    if max < tmp:
        max = tmp
print(max)
### BUGGY CODE ###

# coding: utf-8
import math
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
item_list = list(map(int, input().split()))

for i in range(M):
    item_list.sort()
    item_list[-1] = math.floor(item_list[-1] / 2)

total = 0
for p in item_list:
    total += p

print(total)


### FIXED CODE ###

# coding: utf-8
from heapq import heapify, heappop, heappush
import sys

input = sys.stdin.readline
N, M = map(int, input().split())
item_list = [int(x) * (-1) for x in input().split()]

heapify(item_list)

for i in range(M):
    price = heappop(item_list)
    price = int(price / 2)
    heappush(item_list, price)

total = -sum(item_list)
print(total)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys
from functools import reduce
import fractions

MOD = 1000000007  # type: int


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def solve(N: int, A: "List[int]"):
    m = lcm(*A)

    def sumup(x, y):
        return (x + m // y) % MOD
    print(reduce(sumup, A, 0))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from functools import reduce
import fractions

MOD = 1000000007  # type: int

GCD_CACHE = {}


def gcd(x, y):
    if (x, y) in GCD_CACHE:
        return GCD_CACHE[(x, y)]
    d = fractions.gcd(x, y)
    GCD_CACHE[(x, y)] = d
    return d


def lcm_base(x, y):
    return (x * y) // gcd(x, y)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def solve(N: int, A: "List[int]"):
    m = lcm(*A) % MOD
    sum = 0
    for a in A:
        sum = (sum + m*pow(a, MOD-2, MOD)) % MOD
    print(sum)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


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

from math import *

p = 1000000007

def make_ft(max):
    ft = [0] * (max+1)
    x = 1
    ft[0] = 1
    # ft[i] == i!
    for i in range(1, max+1):
        x *= i
        x %= p
        ft[i] = x
    return ft

# i!^-1 == i!^(p-2) (mod p)
def make_ift(max, ft):
    ift = [0] * (max+1)
    ift[0] = 1
    for i in range(1, max+1):
        invf = 1
        x = ft[i]
        for j in range(ceil(log2(p-2))):
            # x == i!^2^j
            if ((p - 2) >> j) & 1:
                invf *= x
                invf %= p
            x *= x
            x %= p
        ift[i] = invf
    return ift

def combination(a, b, ft, ift):
    res = ft[a] * ift[b] * ift[a-b]
    res %= p
    return res

def main():
    H, W, A, B = list(map(int, input().split()))

    ft = make_ft(H+W)
    ift = make_ift(H+W, ft)
    ans = 0
    for i in range(H-A):
        ans += combination(B+i-1, i, ft, ift) * combination(W-B+H-i-2, H-i-1, ft, ift)
        ans %= p

    print(ans)

if __name__ == '__main__':
    main()


### FIXED CODE ###

H, W, A, B = list(map(int, input().split()))
p = 1000000007

fac = [1] * (H + W + 1)
x = 1
for i in range(1, H + W + 1):
    x *= i
    x %= p
    fac[i] = x

ifac = [1] * (H + W + 1)
x = fac[H + W]
q = p - 2

while q > 0:
    if q & 1:
        ifac[H + W] *= x % p
    x *= x % p
    q >>= 1

for i in range(H + W - 1, 0, -1):
    ifac[i] = ifac[i + 1] * (i + 1) % p

def com(a, b):
    return (fac[a] * ifac[b] * ifac[a-b]) % p

ans = 0

for i in range(H-A):
    ans += com(B+i-1, i) * com(W-B+H-i-2, H-i-1)
    ans %= p

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

s = input()
dp = {}
m = 10 ** 5
p = 1
for x in range(1, m+1):
    for i, e in enumerate(s):
        if x == 1: dp[(x, i)] = i - p if e == 'L' else i + p
        else: dp[(x, i)] = dp[(x-1, dp[(1, i)])]
ct = [0] * len(s)
for x in range(len(s)):
    ct[dp[(m, x)]] += 1
print(' '.join([str(ct[x]) for x in range(len(s))]))

### FIXED CODE ###

s = input()
sl = len(s)
dp = {}
ct = [0] * sl
for x in range(sl):
    dp[(0, x)] = x - 1 if s[x] == 'L' else x + 1
for i in range(17):
    for j in range(sl):
        dp[(i + 1, j)] = dp[(i, dp[(i, j)])]
for x in range(sl): ct[dp[(17, x)]] += 1
print(' '.join([str(ct[x]) for x in range(sl)]))
### BUGGY CODE ###

# D - Digits Parade
# https://atcoder.jp/contests/abc135/tasks/abc135_d

S = input()
n = len(S)

MOD = 10 ** 9 + 7

# dp[i][j] i桁目まででj余る数
dp = [[0] * 13 for _ in range(n + 1)]
dp[0][0] = 1

for i, s in enumerate(S):
  for j in range(10):
    if s == "?" or int(s) == j:
      for k in range(13):
        dp[i + 1][(k * 10 + j) % 13] += dp[i][k]
  for k in range(13):
    dp[i + 1][k] %= MOD

print(dp[n][5])


### FIXED CODE ###

MOD = 10 ** 9 + 7

S = input()
N = len(S)

dp = [[0] * 13 for _ in range(N + 1)]
dp[0][0] = 1

mul = 1

for i, x in enumerate(S[::-1]):
  if x == "?":
    for k in range(10):
      for j in range(13):
        jj = (mul * k + j) % 13
        dp[i + 1][jj] += dp[i][j]
        dp[i + 1][jj] %= MOD
  else:
    k = int(x)
    for j in range(13):
      jj = (mul * k + j) % 13
      dp[i + 1][jj] += dp[i][j]
      dp[i + 1][jj] %= MOD

  mul = (mul * 10) % 13

print(dp[N][5])
### BUGGY CODE ###

n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
a_set=set(a)
b=q-k+1
san=list(range(1,n+1))
for i in san:
    if i in a_set and b>0:
        if a.count(i)>=b:
            print('Yes')
        else:
            print('No')
    elif b<=0:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
score=[k-q]*n
for i in a:
    score[i-1]+=1
for i in score:
    if i>0:
        print('Yes')
    else:
        print('No')