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

A,B,K = map(int,input().split())

s = [i for i in range(A,B+1)]


if 2 * K >= len(s):
    for j in range(len(s)):
        print(s[j])

    exit()

l = [s[i] for i in range(0,K)]
k = [s[h] for h in range(len(s) - K, len(s))]

for a in range(len(l)):
    print(l[a])
for b in range(len(k)):
    print(k[b])

#for t in range(0,K):
#    print(s[t])

# s.reverse()

#for h in range(len(s) - K,len(s)):
#    print(s[h])



### FIXED CODE ###

A,B,K = map(int,input().split())

#s = [i for i in range(A,B+1)]


if 2 * K >= B - A + 1:
    for j in range(A,B+1):
        print(j)

    exit()

#l = [s[i] for i in range(0,K)]
#k = [s[h] for h in range(len(s) - K, len(s))]

for a in range(A,A+K):
    print(a)
for b in range(B-K+1,B+1):
    print(b)

#for t in range(0,K):
#    print(s[t])

# s.reverse()

#for h in range(len(s) - K,len(s)):
#    print(s[h])
### BUGGY CODE ###

K,S = map(int, input().split())
cnt = 0
K += 1
for X in range(K):
    for Y in range(K ):
        for Z in range(K):
            if X + Y + Z == S:
                cnt += 1
print(cnt)


### FIXED CODE ###


K,S = map(int, input().split())
cnt = 0

for X in range(K + 1):
    if S - X < 0:
        break
    for Y in range(K + 1):
        if S - X - Y < 0:
            break
        if S - X - Y <= K:
            cnt += 1

print(cnt)
### BUGGY CODE ###

N = int(input())
P = list(map(int, input().split()))
count = 0
minnum = 0
num = 1
while num <= max(P):
    if num in P:
        minnum = P.index(num)
        del P[minnum+1:]
        count = count + 1
        num = num + 1
    else:
        num = num + 1
print(count)        
    

### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
count = 0
minP = P[0]
for i in range(N):
    if P[i] <= minP:
        count += 1
        minP = P[i] 

print(count)
### BUGGY CODE ###

def main():
    import sys 
    input = sys.stdin.readline
    n = int(input())
    l = list(map(int,input().split()))
    c1 = [0]*60
    c0 = [0]*60
    mod = 10**9+7

    for i in l:
        for j in range(60):
            if (i >> j) & 1:
                c1[j] += 1
            else:
                c0[j] += 1

    ans = 0
    ni = 1
    for i in range(60):
        ans += (c1[i]*c0[i]*ni)%mod
        ans %= mod
        ni = ni*2%mod
    print(ans%mod)
if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import sys 
    input = sys.stdin.readline
    n = int(input())
    l = list(map(int,input().split()))
    c1 = [0]*60
    c0 = [0]*60
    mod = 10**9+7

    for i in l:
        for j in range(60):
            if (i >> j) & 1:
                c1[j] += 1
            else:
                c0[j] += 1

    ans = 0
    ni = 1
    for i in range(60):
        ans += (c1[i]*c0[i]*ni)%mod
        ans %= mod
        ni = ni*2%mod
    print(ans%mod)
if __name__ == "__main__":
    main()
### BUGGY CODE ###

n=int(input())
a= list((map(int, input().split()))) 
b=[0]

 
for i in range(n):
  if a[0]-b[-1]==1:
    b.append(a.pop(0))
  else:
    a.pop(0)
if n-len(b)+1==n:
  print(-1)
else:
  print(n-len(b)+1)

### FIXED CODE ###

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

count=1
for i in range(n):
  if a[i]==count:
    count+=1
if count==1:
  print(-1)
else:
  print(n-count+1)
### BUGGY CODE ###

import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n = input_int()
    d = dict()
    for i in range(1, n + 1):
        d[i] = input_int_list()[::-1]
    day = 0
    matches = 0
    while True:
        played = set()
        for a, v in d.items():
            if d[a] and a not in played:
                b = d[a][-1]
                if d[b] and a == d[b][-1] and b not in played:
                    d[a].pop()
                    d[b].pop()
                    played.add(a)
                    played.add(b)
                    matches += 1
        if not played:
            break
        day += 1

    if matches == (n * (n - 1)) // 2:
        print(day)
    else:
        print(-1)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n = input_int()
    d = dict()
    for i in range(1, n + 1):
        d[i] = input_int_list()[::-1]
    day = 0
    candi = set(range(1, n + 1))
    rest = (n * (n - 1)) // 2
    while rest:
        played = set()
        for a in candi:
            if d[a] and d[d[a][-1]][-1] and a == d[d[a][-1]][-1]:
                played.add(a)
                played.add(d[a][-1])

        if not played:
            break

        candi.clear()

        rest -= len(played) // 2
        for a in played:
            candi.add(a)
            d[a].pop()
            if d[a]:
                candi.add(d[a][-1])
        day += 1

    if rest == 0:
        print(day)
    else:
        print(-1)


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

import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    S = list(map(int, LS()))
    S = S[::-1]
    ln = len(S)
    mod = 2019

    times = 1
    for i in range(ln):
        S[i] = S[i] * times % mod
        times = times * 10

    R = [0] * (ln+1)
    memo = {0: 1}
    ans = 0
    for i in range(1, ln+1):
        tmp = (R[i-1] + S[i-1]) % mod
        R[i] = tmp
        cnt = memo.get(tmp, 0)
        ans = ans + cnt
        memo[tmp] = cnt + 1
    print(ans)

if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())
 
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
 
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
 
INF = float('inf')
 
def solve():
    S = list(map(int, list(input())))
 
    S = S[::-1]
    # print(S)
    n = len(S)
    mod = 2019
 
    #
    A = [0] * (n)
    a = 1
    for i in range(n):
        A[i] = S[i] * a
        a = a * 10 % mod
    # print(A)
 
    # 累積和
    R = [0] * (n+1)
    for j in range(n):
        R[j+1] = (R[j] + A[j]) % mod
    # print(R)
 
    # 個数を数える
    cnt = {}
    ans = 0
    for l in range(0, n+1):
        r = R[l]
        ans = ans + cnt.get(r, 0)
        cnt[r] = cnt.setdefault(r, 0) + 1
    print(ans)
 
if __name__ == '__main__':
    solve()
### BUGGY CODE ###

n,k=map(int,input().split())
ans=n
for i in range(n+1,k+1):
    ans^=i
print(ans)

### FIXED CODE ###

p=[0]*42
q=[0]*42
x=1
a,b=map(int,input().split())
if a==b:
    print(a)
    exit()

a-=1
for i in range(42):
    if b//x<1: break
    if x==1:
        q[0]=((b+1)//2)%2
    else:
        q[i]=[0,((b+1)%x)%2][(b//x)%2]
    x*=2
x=1
for i in range(42):
    if a//x<1: break
    if x==1:
        p[0]=((a+1)//2)%2
    else:
        p[i]=[0,((a+1)%x)%2][(a//x)%2]
    x*=2
x=1
ans=0
for i in range(42):
    ans+=(p[i]^q[i])*x
    x*=2
print(ans)
### BUGGY CODE ###

n = int(input())
s = input()

cnt = 0
for i in range(1000):
	sec = str('%03d' % i)
	nex = 0
	for j in range(n):
		if nex == 0 and s[j] == sec[0]:
			nex += 1
		elif nex == 1 and s[j] == sec[1]:
			nex += 1
		elif nex == 2 and s[j] == sec[2]:
			cnt += 1
			break
print(cnt)


### FIXED CODE ###

n = int(input())
s = input()

cnt = 0
for i in range(1000):
	sec = str('%03d' % i)
	if sec[0] in s and sec[1] in s and sec[2] in s:
		nex = 0
		for j in range(n):
			if nex == 0 and s[j] == sec[0]:
				nex += 1
			elif nex == 1 and s[j] == sec[1]:
				nex += 1
			elif nex == 2 and s[j] == sec[2]:
				cnt += 1
				break
print(cnt)
### BUGGY CODE ###

def main():
    k,n=map(int,input().split())
    a=list(map(int,input().split()))
    resf=10**7
    for i in a:
        if i==a[0]:
            res=min(a[-1]-a[0],k-(a[1]-a[0]))
        elif i==a[-1]:
            res=min(k-(a[-1]-a[-2]),a[-1]-a[0])
        else:
            if k-(a[a.index(i)+1]-i)<=k-(i-a[a.index(i)-1]):
                res=k-(a[a.index(i)+1]-i)
            else:
                res=k-(i-a[a.index(i)-1])
        if resf>=res:
            resf=res
    print(resf)

if __name__ == '__main__':
    main()

### FIXED CODE ###

# coding: utf-8
# Your code here!
def main():
    k,n=map(int,input().split())
    a=list(map(int,input().split()))
    resf=10**7
    z=0
    for i in a:
        if i==a[0]:
            res=min(a[-1]-a[0],k-(a[1]-a[0]))
        elif i==a[-1]:
            res=min(k-(a[-1]-a[-2]),a[-1]-a[0])
        else:
            if k-(a[z+1]-i)<=k-(i-a[z-1]):
                res=k-(a[z+1]-i)
            else:
                res=k-(i-a[z-1])
        if resf>=res:
            resf=res
        z+=1
    print(resf)

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

N, M, = (int(i) for i in input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
AB.sort(key=lambda x:x[0])

money = 0
items = 0
for i in range(N):
    if (items + AB[i][1] < M):
        money += AB[i][0] * AB[i][1]
        items += AB[i][1]
    else:
        for j in range(1,AB[i][1]+1):
            if (items+j == M):
                money += AB[i][0] * j
                items +=j

print(money)

### FIXED CODE ###

N, M, = (int(i) for i in input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
AB.sort(key=lambda x:x[0])

money = 0
items = 0
for i in range(N):
    if (items + AB[i][1] < M):
        money += AB[i][0] * AB[i][1]
        items += AB[i][1]
    else:
        j = (M - items)
        money += AB[i][0] * j
        items +=j
        # for j in range(1,AB[i][1]+1):
        #     if (items+j == M):
        #         money += AB[i][0] * j
        #         items +=j

print(money)
### BUGGY CODE ###

import math

n=int(input())
a=list(map(lambda x:int(x), input().split()))
for ri in range(n):
    count=0
    cpa	= a[:]
    cpa.pop(ri)
    cpa.insert(0, 0)
    cpa.append(0)
    for i in range(len(cpa)):
        if i+1>=len(cpa):
            break
        count+=math.fabs(cpa[i]-cpa[i+1])
    print(int(count))

### FIXED CODE ###

n=int(input())
a=list(map(lambda x:int(x), input().split()))
a.insert(0,0)
a.append(0)
count=0
s=sum([abs(a[i]-a[i+1]) for i in range(0, n+1)])
for i in range(1, n+1):
    c=s+abs(a[i-1]-a[i+1])-(abs(a[i-1]-a[i])+abs(a[i]-a[i+1]))
    print(c)
### BUGGY CODE ###

n=int(input())
ta=[list(map(int,input().split())) for i in range(n)]
t=ta[0][0]
a=ta[0][1]
for i in range(1,n):
    T,A=ta[i]
    s,b=T,A
    while T<t or A<a:
        T+=s
        A+=b
    t,a=T,A
print(t+a)

### FIXED CODE ###

n=int(input())
ta=[list(map(int,input().split())) for i in range(n)]
T=ta[0][0]
A=ta[0][1]
for i in range(1,n):
    t,a=ta[i]
    if T%t==0:
        s=T//t
    else:
        s=T//t+1
    if A%a==0:
        b=A//a
    else:
        b=A//a+1
    T=t*max(s,b)
    A=a*max(s,b)
print(T+A)
### BUGGY CODE ###

n,k = map(int, input().split())
a = list(map(int, input().split()))
b = list(set(a))
tmp = []
res = 0
if len(b) <= k:
  print(0)
else:
  for i in b:
    tmp.append(a.count(i))
  tmp.sort()
  for i in range(len(b) - k):
    res = res + tmp[i]
  print(res)

### FIXED CODE ###

from collections import Counter
n,k = map(int, input().split())
a = list(map(int, input().split()))
b = list(set(a))
if len(b) <= k:
  print(0)
else:
  c = sorted(Counter(a).values(), reverse=True)
  print(sum(c[k:]))
### BUGGY CODE ###

N = int(input())
P = []

for i in range(1, N):
    P.append(i)
    
print(sum(P))

### FIXED CODE ###

N = int(input())

print(N*(N-1)//2)
### BUGGY CODE ###

H,N = map(int,input().split())
A = list(map(int,input().split()))
ln = len(A)
count = [0]*len(A)

def fight(A,H,count,ln):
    while 1:
        if A == [0] * ln:
            return 'No'
        if H > 0:
            H -= max(A)
            ix = A.index(max(A))
            count[ix] += 1
            if count[ix] == 1:
                A[ix] = 0
        if H <= 0:
            return 'Yes'

print(fight(A,H,count,ln))

### FIXED CODE ###

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

if H <= sum(A):
    print('Yes')
else:
    print('No')
### BUGGY CODE ###

H, W = map(int, input().split())

maze = [input() for _ in range(H)]

light_max = 0

def light(xx, yy):
    ans = 0
    for dy in [-1, 1]:
        xx0 = xx
        yy0 = yy + dy
        while 0 <= yy0 <= H-1:
            if maze[yy0][xx0] == '#':break
            ans += 1
            yy0 += dy
    return ans

for hh in range(H):
    hh_lst = [i for i in maze[hh].split('#') if i !='']
    ww = 0
    k = 0
    while ww<=W-1:
        if maze[hh][ww] == '.':
            for j in range(len(hh_lst[k])):
                light_max = max(light_max, light(ww + j, hh)+len(hh_lst[k]))
                
            ww += j
            k += 1
        ww += 1
print(light_max)

### FIXED CODE ###

import numpy as np

H, W = map(int, input().split())

maze01 = np.array([[int(x=='.') for x in input()] for _ in range(H)]) 

u = np.zeros((H, W), dtype=np.int32)
d = np.zeros((H, W), dtype=np.int32)
r = np.zeros((H, W), dtype=np.int32)
l= np.zeros((H, W), dtype=np.int32)


u[0] = maze01[0]
d[H - 1] = maze01[H - 1]
for hh in range(1,H):
    u[hh] = u[hh-1] + maze01[hh]
    u[hh] *= maze01[hh]
    d[H - hh - 1] = d[H - hh] + maze01[H - hh - 1]
    d[H - hh - 1] *= maze01[H - hh - 1]

l[:, 0] = maze01[:, 0]
r[:, W - 1] = maze01[:, W - 1]
for ww in range(1, W):
    l[:, ww] = l[:, ww -1] + maze01[:, ww]
    l[:, ww] *= maze01[:, ww]
    r[:, W - ww -1] = r[:, W - ww] + maze01[:, W - ww - 1]
    r[:, W - ww -1] *= maze01[:, W - ww - 1]

cnt = r + l + u + d - 3

print(max([max(cnt[i]) for i in range(H)]))
### BUGGY CODE ###

inf = 10 ** 10
n, k = map(int, input().split())
h = [int(i) for i in input().split()]
dp = [inf] * n
dp[0] = 0
for i in range(n - 1):
    for j in range(i + 1, min(n, k + i + 1)):
        dp[j] = min(dp[j], abs(h[j] - h[i]) + dp[i])
print(dp[-1])

### FIXED CODE ###

def main():
    n, k = [int(e) for e in input().split()]
    h = [int(e) for e in input().split()]
    dp = [0] * n
    for i in range(1, n):
        dp[i] = min(dp[j] + abs(h[j] - h[i]) for j in range(max(i - k, 0), i))
    print(dp[n-1])
main()
### BUGGY CODE ###

import numpy as np

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

num_A = [A.count(i) for i in range(10**5+1)]
first = 0
for i, n in enumerate(num_A):
    first += n*i

for i in range(Q):
    b, c = map(int, input().split())
    first += c*num_A[b]
    first -= b*num_A[b]
    num_A[c] += num_A[b]
    num_A[b] = 0
    print(first)

### FIXED CODE ###

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

num_A = [0 for i in range(10**5+1)]
first = 0

for a in A:
    num_A[a] += 1
    first += a

for i in range(Q):
    b, c = map(int, input().split())
    first += c*num_A[b]
    first -= b*num_A[b]
    num_A[c] += num_A[b]
    num_A[b] = 0
    print(first)
### BUGGY CODE ###

N,M=map(int, input().split())
L=[ [] for _ in range(N)]

X=[]
for _ in range(M):
    a,b = input().split()
    a=int(a)
    b=int(b)
    L[a-1].append(b)
    X.append({a:b})
Y=[ (sorted(L[_])) for _ in range(N) ]
for i in range(M) :
    for k,v in X[i].items():
        z='%06d' % (Y[k-1].index(v)+1)
        Z='%06d' % k
        print(Z+z)


### FIXED CODE ###

N,M = map(int,input().split())
L = []
for i in range(M):
    l = list(map(int,input().split()))+[i]
    L.append(l)
cnt = 0
tmp = []
M = sorted(L,key = lambda x: (x[0],x[1]))
for x in M:
    if tmp == x[0]:
        x.append(cnt+1)
        cnt += 1
    else:
        tmp = x[0]
        cnt = 0
        x.append(cnt)
M = sorted(L,key = lambda x:x[2])
#print(M)
for x in M:
    st = str(x[0]).zfill(6)
    st += str(x[3]+1).zfill(6)
    print(st)
### BUGGY CODE ###

n, k = map(int, input().split())
temp = n
while temp > abs(temp - k):
    temp = abs(temp - k)

print(temp)

### FIXED CODE ###

n, k = map(int, input().split())
print(min(n%k, k-n%k))
### BUGGY CODE ###

N = int(input())
S = input()
ans = int((N*(N-1)*(N-2))/6)
# Count Duplicate
hash = {}
for i in range(0,N-2):
    for j in range(i+1,N-1):
        for k in range(j+1,N):
            if hash.get(S[i]+S[j]+S[k]):
                ans -= 1
            else :
                hash[S[i]+S[j]+S[k]] = True
print(ans)

### FIXED CODE ###

def is_passcode_exist(S,passcode):
    passcode_idx = 0
    passcode_is_exist = False
    for c in S:
        if passcode_idx == 3:
            passcode_is_exist = True
            break
        if passcode[passcode_idx] == c:
            passcode_idx += 1
    if passcode_idx == 3:
        passcode_is_exist = True
    return passcode_is_exist

if __name__ == "__main__":
    N = int(input())
    S = input()
    count = 0
    for i in range(0,1000):
        if is_passcode_exist(S,str(i).zfill(3)):
            count += 1
    print(count)
### BUGGY CODE ###

H,W = list(map(int,input().split()))
A = [["*"]*(W+2)]

sum = 0
cnt = 0

for i in range(H):
    a = ["*"]
    a += input()
    a.append("*")
    sum += a.count("#")
    A.append(a)
A.append(["*"]*(W+2))

B = []
for i in range(H+2):
    B.append([0]*(W+2))

while True:
    if sum == H*W:
        break
    x = []
    for i in range(1,H+1):
        for j in range(1,W+1):
            if A[i][j] == "#":
                if B[i][j] == 0:
                    B[i][j] = 1
                    for k,l in [[-1,0],[0,-1],[0,1],[1,0]]:
                        if A[i+k][j+l] == ".":
                            A[i+k][j+l] = "*"
                            x.append([i+k,j+l])

    for i,j in x:
        A[i][j] = "#"
        sum += 1

    cnt += 1

print(cnt)

### FIXED CODE ###

from collections import deque
H, W = map(int, input().split())
q = deque()
A = []
for h in range(H):
    r = input()
    for w in range(W):
        if r[w] == "#":
            q.append([h, w])
    A.append([0 if s=="#" else -1 for s in r])

d = [[-1, 0], [0, -1], [0, 1], [1, 0]]
p = 0

while q:
    h, w = q.popleft()
    p = A[h][w]+1
    for dh, dw in d:
        nh = h+dh
        nw = w+dw
        if not (0 <= nh < H):
            continue
        if not (0 <= nw < W):
            continue
        if A[nh][nw] == -1:
            A[nh][nw] = p
            q.append([nh, nw])

print(p-1)
### BUGGY CODE ###


s = input()
l = len(s)
cnt = 0

for i in range(l):
    for j in range(i+1,l):
            a = int(s[i:j+1])
            if a % 2019 == 0 and j < l:
                cnt += 1

print(cnt)


### FIXED CODE ###

s = input()
p = 2019
t = 1
y = 0
c = [0] * p
c[0] = 1
for x in map(int, s[::-1]):
    y = (y + t*x) % p
    c[y] += 1
    t = (t*10) % p
print(sum(i*(i-1)//2 for i in c))
### BUGGY CODE ###

loop = input()
a = map(int, input().split())
cnt = 0
 
while(1):
  flg = 0
  for i in a:
    if(i%2 == 1):
      flg = 1
    else:
      i = i/2
      
  if(flg == 0):
    cnt += 1
  else:
    break
 
print(cnt)


### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
### BUGGY CODE ###

n = int(input())
al = list(int(input()) for _ in range(n))

al_s = list(set(al))
count = 0

for a in al_s:
    if al.count(a) % 2 != 0:
        count += 1

print(count)


### FIXED CODE ###

n = int(input())
al = list(int(input()) for _ in range(n))

s = set()

for a in al:
    s ^= {a}

print(len(s))
### BUGGY CODE ###

A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = [1]

g = gcd(A, B)
i = 2
while g > 1:
    if g % i == 0:
        if L[-1] != i:
            L.append(i)
        g /= i
    else:
        i += 1
print(len(L))


### FIXED CODE ###

A, B = map(int,input().split())
def gcd(a,b):
    if a < b:
        a,b = b,a
    if b == 0: return a
    r = a % b
    return gcd(b,r)

L = [1]

g = gcd(A, B)
g_copy = gcd(A, B)
i = 2
while g > 1:
    if i > g_copy ** (1/2) :
        if g != 1:
            L.append(i)
        break
    if g % i == 0:
        if L[-1] != i:
            L.append(i)
        g /= i
    else:
        i += 1
print(len(L))
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10000)

N, M, R = map(int, input().split())
dest = list(map(int, input().split())) #訪れないと行けない街r1, r2, ..., rR

d = [[float('inf')] * N for _ in range(N)]
for i in range(N):
    d[i][i] = 0
for _ in range(M):
    A, B, C = map(int, input().split())
    d[A - 1][B - 1] = C
    d[B - 1][A - 1] = C

#ワーシャルフロイト法
#d[i][j]はi→jの最短経路長
for k in range(N):
    for i in range(N):
        for j in range(N):
            d[i][j] = min(d[i][j], d[i][k] + d[k][j])

c = [[d[dest[i] - 1][dest[j] - 1] for j in range(R)] for i in range(R)]

dp_memo = [[float('inf')] * R for _ in range(1 << R)]

def TSP(T, v):
    #今まで訪れた頂点の集合：T　今いる頂点：vとしたときの残りを全部巡回する最短の長さ

    if dp_memo[T][v] != float('inf'):
        return dp_memo[T][v]

    elif T == (1 << R) - 1 :
        #全部訪れたとき
        dp_memo[T][v] = 0
        return 0
    else:
        res = float('inf')
        for u in range(R):
            if (T >> u) & 1 == 0:
                res = min(res, TSP(T | (1 << u), u) + c[v][u])
        dp_memo[T][v] = res
        return res

ans = float('inf')
for i in  range(R):
    ans = min(ans, TSP(0, i))
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

N, M, R = map(int, input().split())
dest = list(map(int, input().split())) #訪れないと行けない街r1, r2, ..., rR

d = [[float('inf')] * N for _ in range(N)]
for i in range(N):
    d[i][i] = 0
for _ in range(M):
    A, B, C = map(int, input().split())
    d[A - 1][B - 1] = C
    d[B - 1][A - 1] = C

#ワーシャルフロイト法
#d[i][j]はi→jの最短経路長
for k in range(N):
    for i in range(N):
        for j in range(N):
            d[i][j] = min(d[i][j], d[i][k] + d[k][j])

c = [[d[dest[i] - 1][dest[j] - 1] for j in range(R)] for i in range(R)]

dp_memo = [[float('inf')] * R for _ in range(1 << R)]

def TSP(T, v):
    #今まで訪れた頂点の集合：T　今いる頂点：vとしたときの残りを全部巡回する最短の長さ

    if dp_memo[T][v] != float('inf'):
        return dp_memo[T][v]

    elif T == (1 << R) - 1 :
        #全部訪れたとき
        dp_memo[T][v] = 0
        return 0
    else:
        res = float('inf')
        for u in range(R):
            if (T >> u) & 1 == 0:
                res = min(res, TSP(T | (1 << u), u) + c[v][u])
        dp_memo[T][v] = res
        return res

ans = float('inf')
for i in  range(R):
    ans = min(ans, TSP(0, i))
print(ans)
### BUGGY CODE ###

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

A = []

for i in range(Q):
    A.append(int(input()))

for i in range(N):
    temp = A.count(i+1)
    if K > Q-temp:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

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

A = []

for i in range(Q):
    A.append(int(input()))

points = [K-Q]*N

for i in range(Q):
    points[A[i]-1] += 1

for i in range(N):
    if points[i] > 0:
        print('Yes')
    else:
        print('No')