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

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]

N = int_list[0]

total = 0
for i in range(N):
    total+=i

print(total)



### FIXED CODE ###

N = int(input())
total=int(N*(N-1)//2)
print(total)
### BUGGY CODE ###

L,R = map(int,input().split())
ans = set()
mini = 2019
for i in range(L,R+1):
  ans.add(i%2019)
  
for i in ans:
  for j in ans:
    if (i*j)%2019 < mini and i != j:
      mini = (i*j)%2019
print(mini)
      

### FIXED CODE ###

L,R = map(int,input().split())
ans = set()
mini = 2019
if (R-L) >= 2019:
  print(0)
else:  
  for i in range(L,R+1):
    ans.add(i%2019)
  
  for i in ans:
    for j in ans:
      if (i*j)%2019 < mini and i != j:
        mini = (i*j)%2019
  print(mini)
### BUGGY CODE ###

n, k, q = input().split()
n, k, q = [int(n), int(k), int(q)]
scores = [k for i in range(0,n)]
for i in range(0,q):
  A = int(input())
  for j in range(0, n):
    if not (j+1)==A:
      scores[j] -= 1

for i in range(0, n):
  if scores[i]>0:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n, k, q = input().split()
n, k, q = [int(n), int(k), int(q)]
d = dict()
for i in range(0, n):
    d[i+1] = 0

for i in range(0, q):
    A = int(input())
    d[A] += 1
for i in range(0, n):
    times = d[i+1]
    if (k-q+times)>0:
        print("Yes")
    else:
        print("No")
### BUGGY CODE ###

import sys
input = sys.stdin.readline

from collections import Counter
from heapq import heapify, heappush, heappop
from copy import deepcopy


def main():
    n = int(input())
    a = list(map(int, input().split()))

    #n = 3 * 10 ** 5
    #a = list(range(1, n + 1))

    c = Counter(a)
    c = [-e for e in c.values()]
    heapify(c)

    k_mx = len(c)

    for k in range(1, n + 1):
        if k > k_mx:
            print(0)
            continue

        ans = -1
        mn = -1
        cp = deepcopy(c)
        end = False
        while not end:
            ans -= mn
            eat = []
            for _ in range(k):
                mn = heappop(cp)
                if mn >= 0:
                    end = True
                    break
                eat.append(mn)

            for e in eat:
                heappush(cp, e - mn)

        print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

from collections import Counter
from itertools import accumulate
from math import floor
from bisect import bisect_left


def main():
    n = int(input())
    a = list(map(int, input().split()))

    c = Counter(a)
    c = list(c.values())

    d = Counter(c)
    d_li = [0] * (n + 1)
    for k, v in d.items():
        d_li[k] = v

    dk_acm = list(accumulate(d_li))

    kdk_acm = [0]
    for k, e in enumerate(d_li[1:], 1):
        kdk_acm.append(kdk_acm[-1] + k * e)

    def f(x):
        kdk_sm = kdk_acm[x]
        dk_sm = dk_acm[n] - dk_acm[x]

        return floor((kdk_sm + x * dk_sm) / x)

    fs = [float("inf")] + [f(x) for x in range(1, n + 1)]
    fs = fs[::-1]

    for k in range(1, n + 1):
        print(n - bisect_left(fs, k))


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

N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if sum(a) == sum(b):
    if a == b:
        print("Yes")
    else:
        print("No")
elif sum(a) > sum(b):
    print("No")
else:
    for i in range(sum(b)-sum(a)):
        flg1 = 0
        flg2 = 0
        for j in range(N):
            if flg1 == 1 and flg2 ==1:
                break
            if a[j] < b[j] and flg1 == 0:
                a[j] += 2
                flg1 = 1
                if (abs(a[j]-b[j]))%2 == 1:
                    b[j] += 1
                    flg2 = 1
            if flg2 == 0:
                if b[j] < a[j]:
                    b[j] += 1
                    flg2 = 1
        if flg2 == 0:
            b[0] += 1
    if a == b:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if a == b:
    print("Yes")
elif sum(a) >= sum(b):
    print("No")
else:
    aa = 0
    bb = 0
    for i in range(N):
        if a[i]-b[i] > 0:
            bb += a[i]-b[i]
        elif b[i]-a[i] > 0:
            aa += (b[i]-a[i])//2
    if aa >= bb:
        print("Yes")
    else: 
        print("No")
### BUGGY CODE ###

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

a, b, c, d = map(int, input().split())

g = 0

for i in range(d):
    if a > 0:
        g += 1
        a -= 1
        continue
    if b > 0:
        b -= 1
        continue
    if c > 0:
        g -= 1
        c -= 1
        continue

print(str(g))


### FIXED CODE ###

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

import sys

a, b, c, d = map(int, input().split())

g = 0
gc = d

if d - a > 0 and a > 0:
    g += a
    d -= a
elif a > 0:
    g += d
    print(str(g))
    sys.exit()

if d - b > 0 and b > 0:
    d -= b
elif b > 0:
    print(str(g))
    sys.exit()

if d == c and c > 0:
    g -= d
elif c > 0:
    g -= d

print(str(g))
### BUGGY CODE ###

# -*- coding: utf-8 -*-
# 標準入力の取得
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

# 求解処理
city = 1
cities = [city]
remain = []
remain_count = 0
loop = []
loop_count = 0
cities_append = cities.append
while True:
    city = A[city-1]
    if city in cities:
        remain_count = cities.index(city)
        remain = cities[:remain_count-1]
        loop = cities[remain_count:]
        loop_count = len(loop)
        break
    else:
        cities_append(city)

result = int()
if K < remain_count:
    result = remain[K]
else:
    result = loop[(K - remain_count) % loop_count]

# 結果出力
print(result)


### FIXED CODE ###

# -*- coding: utf-8 -*-
# モジュールのインポート
import math


def get_input() -> tuple:
    """
    標準入力の取得

    Returns:\n
        tuple: 標準入力
    """
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))

    return N, K, A


def main(N: int, K: int, A: list) -> None:
    """
    求解処理.

    Args:
        N (int): 町の数
        K (int): テレポーターの使用回数
        A (list): テレポーターの転送先
    """
    # タブリング表の作成
    to = [A]
    for i in range(math.ceil(math.log2(K))):
        to_i = to[i]
        to_next = []
        for j in range(N):
            to_next.append(to_i[to_i[j]-1])

        to.append(to_next)

    result = 1
    for i in range(math.ceil(math.log2(K))):
        if ((K >> i) & 1):
            result = to[i][result-1]

    print(result)


if __name__ == "__main__":
    N, K, A = get_input()
    main(N, K, A)
### BUGGY CODE ###

n = int(input())
a = tuple(map(int,input().split()))

mod = 10**9 + 7
at = tuple([a[i] % mod for i in range(n)])

ans = 0
for i in range(n):
  ans += sum(at[i+1:])*at[i]
print(ans % mod)

### FIXED CODE ###

n = int(input())
a = tuple(map(int,input().split()))
t = 0
mod = 10**9 + 7
at = []
for j in range(1,n):
  t += a[n-j] % mod 
  at.append(t)

ans = 0
for i in range(n-1):
  ans += at[n-2-i] *a[i]
print(ans % mod)
### BUGGY CODE ###

N = int(input())
Xmi, Xma, Ymi, Yma, DYmi, DYma, UYmi, UYma, RXmi, RXma, LXmi, LXma = [(10**10), -(10**10)] * 6
for _ in range(N):
    x, y, d = input().split()
    x, y = int(x), int(y)
    
    if d == "R":
        RXmi = min(RXmi, x)
        RXma = max(RXma, x)
    elif d == "L":
        LXmi = min(LXmi, x)
        LXma = max(LXma, x)
    else:
        Xmi = min(Xmi, x)
        Xma = max(Xma, x)
        
    if d == "U":
        UYmi = min(UYmi, y)
        UYma = max(UYma, y)
    elif d == "D":
        DYmi = min(DYmi, y)
        DYma = max(DYma, y)
    else:
        Ymi = min(Ymi, y)
        Yma = max(Yma, y)

def calc(t):
    xmi = min(RXmi+t, LXmi-t, Xmi)
    xma = max(RXma+t, LXma-t, Xma)
    ymi = min(UYmi+t, DYmi-t, Ymi)
    yma = max(UYma+t, DYma-t, Yma)
    return max(yma-ymi, 0)*max(xma-xmi, 0)

mi = 10**20
mii = -1

for k in [10**4, 10**2, 1, 0.01, 0.0001, 0.000001, 0.00000001]:
    for i in range(-10**6, 10**6):
        j = mii + i * k
        if j < 0:
            continue
        if calc(j) < mi:
            mi = calc(j)
            mii = j
print(mi)


### FIXED CODE ###

from decimal import *
getcontext().prec = 100
N = int(input())
Xmi, Xma, Ymi, Yma, DYmi, DYma, UYmi, UYma, RXmi, RXma, LXmi, LXma = [(10**10), -(10**10)] * 6
for _ in range(N):
    x, y, d = input().split()
    x, y = int(x), int(y)
    
    if d == "R":
        RXmi = min(RXmi, x)
        RXma = max(RXma, x)
    elif d == "L":
        LXmi = min(LXmi, x)
        LXma = max(LXma, x)
    else:
        Xmi = min(Xmi, x)
        Xma = max(Xma, x)
        
    if d == "U":
        UYmi = min(UYmi, y)
        UYma = max(UYma, y)
    elif d == "D":
        DYmi = min(DYmi, y)
        DYma = max(DYma, y)
    else:
        Ymi = min(Ymi, y)
        Yma = max(Yma, y)

def calc(t):
    xmi = min(RXmi+t, LXmi-t, Xmi)
    xma = max(RXma+t, LXma-t, Xma)
    ymi = min(UYmi+t, DYmi-t, Ymi)
    yma = max(UYma+t, DYma-t, Yma)
    return max(yma-ymi, 0)*max(xma-xmi, 0)
    
def dii(t):
    a = Decimal("0.00000001")
    return calc(t+a) - calc(t-a)

l = Decimal("0")
r = Decimal("10000000000")
for _ in range(500):
    m = (l+r)/2
    if dii(m) > 0:
        r = m
    else:
        l = m
print(calc(m))
### BUGGY CODE ###

s=input()
n=int(input())
r=-1
for i in range(n):
    q=input().split()
    if q[0]=='1':
        r*=-1
    else:
        t=int(q[1])
        if t*r==-1 or t*r==2 :
            s=q[2]+s
        else:
            s=s+q[2]
if r==1:
    s=s[::-1]
print(s)
            


### FIXED CODE ###

s=input()
n=int(input())
r=-1
f=[]
b=[]
for i in range(n):
    q=input().split()
    if q[0]=='1':
        r*=-1
    else:
        t=int(q[1])
        if t*r==-1 or t*r==2 :
            f.append(q[2])
        else:
            b.append(q[2])
f=''.join(f)
b=''.join(b)
s=f[::-1]+s+b
if r==1:
    s=s[::-1]
print(s)
### BUGGY CODE ###

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

x = {i+1: [] for i in range(N)}
y = [None] * M
for i in range(M):
    P, Y = map(int, input().split())
    x[P].append(Y)
    y[i] = (P, Y)

for i in range(N):
    x[i+1].sort()

for i in range(M):
    P, Y = y[i]
    print('{}{}'.format(str(P).zfill(6), str(x[P].index(Y) + 1).zfill(6)))


### FIXED CODE ###

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

x = [[] for _ in range(N)]
a = [None] * M
for i in range(M):
    P, Y = map(int, input().split())
    x[P-1].append(Y)
    a[i] = (P, Y)

y = {}
for i in range(N):
    x[i].sort()
    for j, Y in enumerate(x[i]):
        y[(i+1, Y)] = j + 1
for i in range(M):
    print('{}{}'.format(str(a[i][0]).zfill(6), str(y[a[i]]).zfill(6)))
### BUGGY CODE ###

def main():
    n = int(input())
    s = input()
    ans = 10**10
    for i in range(n):
        lc = s[:i+1].count(".")
        rc = s[i:].count("#")
        tmp = n - lc - rc
        if tmp < ans:
            ans = tmp
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n = int(input())
    s = input()
    white = s.count(".")
    ans, black = white, 0
    for i in range(n):
        if s[i] == ".":
            white -= 1
        else:
            black += 1
        tmp = black + white
        if tmp < ans:
            ans = tmp
    print(ans)


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

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

for i in range(M):
  if S[i][0] == '1':
    for n in range(M):
      if S[i][2] == S[n][0] and S[n][2] == str(N):
        print('POSSIBLE')
        exit()
        
print('IMPOSSIBLE')


### FIXED CODE ###

N, M = map(int, input().split())
from_1 = [False]*N
to_N = [False]*N
for _ in range(M):
    a, b = map(int, input().split())
    if a == 1:
        from_1[b-1] = True
    elif b == N:
        to_N[a-1] = True
for i in range(1, N):
    if from_1[i] and to_N[i]:
        print('POSSIBLE')
        break
else:
    print('IMPOSSIBLE')
### BUGGY CODE ###

s = list(map(int, list(input())))
n = len(s)

countdic = {}
mod = 2019

num = 0
d = 1
for i in range(1,n+1):
    num += s[n-i]*d
    remainder = num%mod
    if remainder in countdic:
        countdic[remainder] += 1
    if remainder not in countdic:
        countdic[remainder] = 1
    d *= 10

ans = 0
for key in countdic:
    ans += countdic[key]*(countdic[key]-1)//2

if 0 in countdic:
    ans += countdic[0]

print(ans)

### FIXED CODE ###

s = list(map(int, list(input())))
n = len(s)

countdic = {}
mod = 2019

num = 0
d = 1
for i in range(1,n+1):
    num += s[n-i]*d
    num %= mod
    if num in countdic:
        countdic[num] += 1
    if num not in countdic:
        countdic[num] = 1
    d = (10*d)%mod

ans = 0
for key in countdic:
    ans += countdic[key]*(countdic[key]-1)//2

if 0 in countdic:
    ans += countdic[0]

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

s = input()
K = int(input())

from heapq import *
def f(s, K):
    known = set()
    for i in range(len(s)):
        for j in range(len(s), i, -1):
            ss = s[i:j]
            if ss in known:
                break
            known.add(ss)
    return sorted(known)[K -1]

print(f(s, K))

### FIXED CODE ###

s = input()
K = int(input())

def f(s, K):
    known = set()
    for i in range(len(s)):
        for j in range(min(len(s), i + 5), i, -1):
            ss = s[i:j]
            if ss in known:
                break
            known.add(ss)
    return sorted(known)[K -1]

print(f(s, K))
### BUGGY CODE ###

k = int(input())

def gcd(a,b,c):
  s = [a,b,c]
  s.sort()
  a,b,c = s
  for n in range(1,a+1):
    if a % n == 0 and b % n == 0 and c % n == 0:
      yakusu = n
  return yakusu

total = 0

for x in range(1,k+1):
    for y in range(x,k+1):
        for z in range(y,k+1):
            if x == y == z:
                total += x
            elif x == y or y == z:
                total += 3 * gcd(x,y,z)
            else:
                total += 6 * gcd(x,y,z)

print(total)


### FIXED CODE ###

import math
k = int(input())


total = 0

for x in range(1,k+1):
    for y in range(x,k+1):
        for z in range(y,k+1):
            if x == y == z:
                total += x
            elif x == y or y == z:
                total += 3 * math.gcd(math.gcd(x,y),z)
            else:
                total += 6 * math.gcd(math.gcd(x,y),z)

print(total)
### BUGGY CODE ###

from collections import deque

H, W = map(int, input().split())
grid = [input() for _ in range(H)]

dxdy = [(-1,0), (1,0), (0,-1), (0,1)]
INF = 999999
que = deque()

dist = [[INF] * W for _ in range(H)]
for i in range(H):
    for j in range(W):
        if grid[i][j] == "#":
            dist[i][j] = 0
            que.append(i*W + j)

ans = 0
while len(que) > 0:
    num = que.popleft()
    h = num // W
    w = num % W
    for dx, dy in dxdy:
        nx = w + dx
        ny = h + dy
        if ny<0 or ny>=H or nx<0 or nx>=W or dist[ny][nx] <= dist[h][w] + 1:
            continue
        dist[ny][nx] = dist[h][w] + 1
        ans = max(ans, dist[ny][nx])
        que.append(ny * W + nx)

print(ans)

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
grid = [input() for _ in range(H)]

dxdy = [(-1,0), (1,0), (0,-1), (0,1)]
INF = 999999
que = deque()

dist = [[INF] * W for _ in range(H)]
for i, row in enumerate(grid):
    for j, s in enumerate(row):
        if s == "#":
            dist[i][j] = 0
            que.append(i*W + j)

ans = 0
while len(que) > 0:
    num = que.popleft()
    h = num // W
    w = num % W
    for dx, dy in dxdy:
        nx = w + dx
        ny = h + dy
        if ny<0 or ny>=H or nx<0 or nx>=W:
            continue
        if dist[ny][nx] == INF:
            que.append(ny * W + nx)
        dist[ny][nx] = min(dist[ny][nx], dist[h][w]+1)
        ans = max(ans, dist[ny][nx])

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

import numpy as np
n = int(input())
a = np.array([int(i) for i in input().split()])
for i in range(n):
  ans = 0
  tmp = 0
  for j in range(n):  
    if i != j:
      ans += abs(tmp - a[j])
      tmp = a[j]
  print(ans+abs(tmp))

### FIXED CODE ###

n = int(input())
a = [0]+[int(i) for i in input().split()]+[0]
ans = sum(abs(a[i+1] - a[i]) for i in range(n+1))
for i in range(1, n+1):
  print(ans - abs(a[i+1] - a[i]) - abs(a[i] - a[i-1]) + abs(a[i+1] - a[i-1]))
### BUGGY CODE ###

N,K = map(int,input().split())
A = list(map(int, input().split()))
sum = 0
last = 0
sw = 0
for num in range(K):
  last += A[num]
for i in range(1,N-K+1):
  for j in range(K):
    sum += A[i+j]
    if last < sum:
      print("Yes")
      sw = 1
  if sw ==0:
    print("No")
  last = sum
  sum = 0
  sw = 0

### FIXED CODE ###

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

for i in range(0,N-K):
  if A[i] < A[i+K]:
    print("Yes")
  else:
    print("No")
### BUGGY CODE ###

N, M = map(int, input().split())
NG = []
for i in range(M):
  NG.append(int(input()))
ans = [0 for _ in range(N + 2)]
ans[0] = 1
for i in range(N):
  if not i + 1 in NG:
    ans[i + 1] += ans[i]
  if not i + 2 in NG:
    ans[i + 2] += ans[i]
print(ans[N]%(10**9+7))

### FIXED CODE ###

N, M = map(int, input().split())
NG = []
a = 10**9+7
NG = [True for _ in range(N + 2)]
for i in range(M):
  NG[int(input())] = False
ans = [0 for _ in range(N + 2)]
ans[0] = 1
for i in range(N):
  if NG[i + 1]:
    ans[i + 1] = (ans[i + 1] + ans[i])%a
  if NG[i + 2]:
    ans[i + 2] = (ans[i + 2] + ans[i])%a
print(ans[N])
### BUGGY CODE ###

def make(Lun):
    Lunstr = str(Lun)
    Lu = []
    if Lunstr[-1] != '9' and Lunstr[-1] != '0':
        for i in range(-1,2):
            New = int(Lunstr + str(int(Lunstr[-1]) + i))
            Lu.append(New)
    elif Lunstr[-1] == '9':
        for i in range(-1,1):
            New = int(Lunstr + str(int(Lunstr[-1]) + i))
            Lu.append(New)
    else:
        for i in range(0,2):
            New = int(Lunstr + str(int(Lunstr[-1]) + i))
            Lu.append(New)
    return Lu
LunLun = [i for i in range(1,10)]
k = 0
i = 10
K = int(input())
sig = 0
for _ in range(100000000):
    NewLun = LunLun[k:i]
    for j in range(len(NewLun)):
        LunLun = LunLun + make(NewLun[j])
        if len(LunLun) >= K:
            sig = -1
            break
    k = i-1
    i = len(LunLun) + 1
    if sig == -1:
        break
print(LunLun[K-1])

### FIXED CODE ###

from collections import deque
K = int(input())
S = [i for i in range(1,10)]
S = deque(S)
for i in range(1,K+1):
    Lun = S.popleft()
    Lu = Lun%10
    if Lu !=0:
        S.append(10*Lun+Lu-1)
    S.append(Lun*10+Lu)
    if Lu !=9:
        S.append(10*Lun+Lu+1)
print(Lun)
### BUGGY CODE ###

n = int(input())
l=list(map(int ,input().split()))
cnt=0
while True:
    for i in range(n):
        if l[i]%2==0:
            l[i]==l[i]//2
        else:
            print(cnt)
            exit()     
    cnt+=1

### FIXED CODE ###

n = int(input())
l=list(map(int ,input().split()))
count=0
k=1
while k==1:
    for i in range(n):
        if l[i]%2==0:
            l[i]=l[i]/2
        else:
            print(count)
            k=2
            break
    count+=1
### BUGGY CODE ###

from collections import deque
import copy
 
def main():
  H, W = map(int, input().split())
  M = [['#' == x for x in input()] for _ in range(H)]
  que = deque([[i, j] for i in range(H) for j in range(W) if M[i][j]])
  ans = 0
  while True:
    qq = deque()
    ans += 1
    while que:
      nh, nw = que.popleft()
      if nw<W-1 and not M[nh][nw+1]:
        qq.append((nh,nw+1))
        M[nh][nw+1] = True
      if  0<nw and not M[nh][nw-1]:
        qq.append((nh,nw-1))
        M[nh][nw-1] = True
      if nh<H-1 and not M[nh+1][nw]:
        qq.append((nh+1,nw))
        M[nh+1][nw] = True
      if 0<nh and not M[nh-1][nw]:
        qq.append((nh-1,nw))
        M[nh-1][nw] = True
    if qq:
      que = copy.copy(qq)
    else:
      break
  print(ans-1)
  
if __name__ == "__main__":
  main()

### FIXED CODE ###

import copy
from collections import deque
def main():
  H, W = map(int, input().split())
  G = [['#' == x for x in input()] for _ in range(H)]
 
  black = deque([(i, j) for i in range(H) for j in range(W) if G[i][j]])
 
  ans = 0
  while True:
    ans += 1
    next_black = deque()
    while black:
      bi, bj = black.popleft()
      if bi > 0 and not G[bi - 1][bj]:
        G[bi - 1][bj] = True
        next_black.append((bi - 1, bj))
      if bj > 0 and not G[bi][bj - 1]:
        G[bi][bj - 1] = True
        next_black.append((bi, bj - 1))
      if bi < H - 1 and not G[bi + 1][bj]:
        G[bi + 1][bj] = True
        next_black.append((bi + 1, bj))
      if bj < W - 1 and not G[bi][bj + 1]:
        G[bi][bj + 1] = True
        next_black.append((bi, bj + 1))
    if next_black:
       black = copy.copy(next_black)
    else:
       break
  print(ans - 1)
  
if __name__ == "__main__":
  main()
### BUGGY CODE ###

n,k,q = (int(x) for x in input().split())
players = [k] * n
for i in range(q):
  player = int(input())
  players = [players[j]-1 if j != player-1 else players[j] for j in range(n)]
answer = ['Yes' if player > 0 else 'No' for player in players]
for i in range(n):
  print(answer[i])

### FIXED CODE ###

n,k,q = (int(x) for x in input().split())
players = [k] * n
result = [0] * n
for i in range(q):
  player = int(input())
  result[player-1] = result[player-1] + 1
for i in range(n):
  if players[i] - q + result[i] > 0:
    print('Yes')
  else:
    print('No')
### BUGGY CODE ###

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

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

ans = 0
for i in range(1000):
    pw = "0"*(3-len(str(i)))+str(i)

    w1 = -1
    for j in range(N-2):
        if S[j] == pw[0]:
            w1 = j
            break
    if w1 == -1:
        continue

    w2 = -1
    for j in range(w1+1, N-1):
        if S[j] == pw[1]:
            w2 = j
            break
    if w2 == -1:
        continue

    w3 = -1
    for j in range(w2+1, N):
        if S[j] == pw[2]:
            w3 = j
            break
    if w3 == -1:
        continue

    ans += 1

print(ans)


### FIXED CODE ###

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

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

ans = 0
for i in range(1000):
    pw = list("{0:03d}".format(i))

    if pw[0] in S:
        w1 = S.index(pw[0])
        if pw[1] in S[w1+1:]:
            w2 = w1+1 + S[w1+1:].index(pw[1])
            if pw[2] in S[w2+1:]:
                ans += 1

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

import sys
input = sys.stdin.readline
r,c,K=map(int, input().split())
grid=[[0]*(c+1) for _ in range(r+1)]
for i in range(K):
    ri,ci,vi=map(int, input().split())
    grid[ri][ci]=vi

dp=[[[0]*4 for _ in range(c+1)] for _ in range(r+1)]

for i in range(1,r+1):
    for j in range(1,c+1):
        dp[i][j][0]=max(dp[i][j][0],dp[i-1][j][0],dp[i-1][j][1],
        dp[i-1][j][2],dp[i-1][j][3])
        for k in range(4):
            dp[i][j][k]=max(dp[i][j][k],dp[i][j-1][k])
        if grid[i][j]!=0:
            dp[i][j][1]=max(dp[i][j][1],max(dp[i-1][j])+grid[i][j])
            for k in range(1,4):
                dp[i][j][k]=max(dp[i][j][k],dp[i][j-1][k-1]+grid[i][j])

print(max(dp[-1][-1]))

### FIXED CODE ###

R,C,K = map(int,input().split())

grid=[[0]*C for _ in range(R)]
for i in range(K):
    x,y,v = map(int,input().split())
    grid[x-1][y-1] = v
dp1 = [[0]*(C+1) for _ in range(R+1)]
dp2 = [[0]*(C+1) for _ in range(R+1)]
dp3 = [[0]*(C+1) for _ in range(R+1)]

for i in range(R):
    for j in range(C):
        dp1[i][j] = max(dp1[i][j-1],dp1[i-1][j]+grid[i][j],
                    dp2[i-1][j]+grid[i][j],dp3[i-1][j]+grid[i][j])
        dp2[i][j] = max(dp2[i][j-1],dp1[i][j-1]+grid[i][j])
        dp3[i][j] = max(dp3[i][j-1],dp2[i][j-1]+grid[i][j])
ans=0
for i in range(R):
    for j in range(C):
        ans=max(ans,dp1[i][j],dp2[i][j],dp3[i][j])
print(ans)
### BUGGY CODE ###

# Knapsack Problem
N, W = [int(x) for x in input().split()]
items = []
for i in range(N):
    items.append(tuple(int(x) for x in input().split()))

DP = [[0] * (W+1) for _ in range(N+1)]
for i in range(N):
    for j in range(W+1):
        v, w = items[i]
        k = 0
        while k * w <= j:
            DP[i+1][j] = max(DP[i+1][j], k*v + DP[i][j-k*w])
            k += 1

print(DP[-1][-1])

### FIXED CODE ###

# Knapsack Problem
N, W = [int(x) for x in input().split()]
items = []
for i in range(N):
    items.append(tuple(int(x) for x in input().split()))


DP = [0] * (W+1)
for i in range(N):
    v, w = items[i]
    for j in range(w, W+1):
        DP[j] = max(DP[j], v + DP[j-w])

print(DP[-1])