Harryxun/stf_run huggingface dataset:
n,k=map(int,input().split())
life=sorted(list(map(int,input().split())))
if n<k:
  print(0)
else
  ans=sum(life[k:])
  print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
life=sorted(list(map(int,input().split())),reverse=True)
if n<k:
  print(0)
else:
  ans=sum(life[k:])
  print(ans)
import numpy as np
n = int(input())

a=list(map(int,input().split()))
import functools
import operator

pre = functools.reduce(operator.mul, a)
if pre <= 1000000000000000000:
    print(pre)
else:
    print(-1)


### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort(reverse=True)

    if 0 in A:
        print('0')
        return
    prod=1
    for a in A:
        prod*=a
        if prod> 1000000000000000000:
            print('-1')
            return
    print(prod)

ans=main()
n, k, q = map(int, input().split())
a_list = [k] * n
# for _ in range(n):
#     a_list.append(k)
#print(a_list)
for _ in range(q):
    a = int(input())
    a_list = list(map(calc_minus, a_list))
    #print(a_list)
    a_list[a-1] = a_list[a-1] + 1
    #print(a_list)

#print(a_list)
for j in a_list:
    if int(j) > 0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

N,K,Q = map(int, input().split()) #N人、K点、Q問
A = [int(input()) - 1 for i in range(Q)] #受験番号とリスト番号のズレを補正
# print(A)
P = [0] * N #持ち点
for j in range(Q):
    P[A[j]] +=1
for k in range(N):
    if P[k] > Q - K:
        print("Yes")
    else:
        print("No")
a=int(input())
b=float(input())

print(int(a*b))

### FIXED CODE ###

from decimal import Decimal as dec
a, b=map(dec, input().split())
print(int(a*b))
s=str(input())
y=700
x=0
while x!=2
if s[x]=o：
　　　y+=100
else:
    y+=0  
x+=1
break
print(y)

### FIXED CODE ###

S = input()
s = S.count('o')*100
 
print(700+s)
N=int(input())
P = list(map(int,input().split()))
ans=0
m=10*10

for i in range(N):
    if min(m,p[i])==P[i]:
        ans+=1
        m=P[i]
print(ans)

### FIXED CODE ###

N=int(input())
P = list(map(int,input().split()))
ans=0
m=P[0]
 
for i in range(N):
    if m >= P[i]:
        ans += 1
        m = P[i]

print(ans)
import math
def add(n):
    return n + 1

def lcm(a):
    ans = a[0]
    for i in range(1, len(a)-1):
        ans = ans * a[i] // math.gcd(ans, a[i])
    return ans

if __name__ == "__main__":

    n = int(input())
    buf = input().split()
    a = [int(s) for s in buf]

    indexes = [i for i, x in enumerate(a) if x == 1]
    indexes = list(map(add, indexes))
    
    boxes = []
    if indexes:
        if max(indexes) > n:
            print("-1")
        else:
            
            while 1:
                num = lcm(indexes)
                if num < n:
                    break
                buf = [x for x in indexes if (max(indexes) % x) == 0]
                boxes.extend(buf)
                indexes = [x for x in indexes if (max(indexes) % x) != 0]
                if not indexes:
                    break 

            print("{}".format(len(boxes)+1))
            if boxes:
                boxes = ' '.join(map(str,boxes)) + " " + str(num)
            else:
                boxes = str(num)
            print(boxes)
    else:
        print("0")

### FIXED CODE ###

def add(n):
    return n + 1

if __name__ == "__main__":
    n = int(input())
    buf = input().split()
    a = [int(s) for s in buf]
    
    boxes = [0] * n

    for i in reversed(range(n)):
        pick_boxes = boxes[i::i+1]
        pick_boxes.pop(0)
        if pick_boxes:
            if (sum(pick_boxes) % 2) == a[i]:
                boxes[i] = 0
            else:
                boxes[i] = 1
        else:
            boxes[i] = a[i]

    box_name = [i for i, x in enumerate(boxes) if x == 1]
    box_name = list(map(add, box_name))
    print(len(box_name))
    if len(box_name) != 0:
        box_name = ' '.join(map(str,box_name))
        print(box_name)
from collections import deque
N = int(input())
a = deque(map(int, input().split()))

def main():
    x, y = dfs(a, 0, 0, True)
    return x - y
def dfs(a, x, y, xturn):
    if len(a) == 1:
        if xturn:
            x += a[0]
        else:
            y += a[0]
        return x, y
    elif len(a) == 2:
        if xturn:
           x += max(a)
           y += min(a)
        else:
            y += max(a)
            x += min(a)
        return x, y
    c1a = a.copy()
    c2a = a.copy()
    c1 = c1a.pop()
    c2 = c2a.popleft()
    if xturn:
        x1, y1 = dfs(c1a, x + c1, y, not xturn)
        x2, y2 = dfs(c2a, x + c2, y, not xturn)
        if x1 > x2:
            return x1, y1
        return x2, y2
    else:
        x1, y1 = dfs(c1a, x, y + c1, not xturn)
        x2, y2 = dfs(c2a, x, y + c2, not xturn)
        if y1 > y2:
            return x1, y1
        return x2, y2
print(main())


### FIXED CODE ###

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

def main():
    l = [[0] * N for _ in range(N)]
    for i in range(N):
        for j in range(N):
            if i + j >= N:
                continue
            s = j
            e = j + i
            if len(a) % 2 != i % 2:
                if i == 0:
                    l[s][e] = a[s]
                elif i == 1:
                    l[s][e] = max(a[s:e+1]) - min(a[s:e+1])
                else:
                    l[s][e] = max(a[s] + l[s+1][e], a[e] + l[s][e-1])
            else:
                if i == 0:
                    l[s][e] -= a[s]
                elif i == 1:
                    l[s][e] = min(a[s:e+1]) - max(a[s:e+1])
                else:
                    l[s][e] = min(l[s+1][e] - a[s], l[s][e-1] - a[e])


    return l[0][-1]
print(main())
import sys

input_list = sys.stdin.readlines()

count = 1
get_count = 0
get_value_count = 0
for i in input_list:
  get_values = i.split()
  if count == 1:
    get_value_count = int(get_values[0])
    get_count = int(get_values[1])
  else:
    if get_value_count == 1:
      print(get_values[0])
    else:
      get_values.sort()
      count_value = 1
      p = 0
      for c in get_values:
        if count_value > get_count:
          print(str(p))
        else:
          p = p + int(c)
        count_value = count_value + 1
  count = count + 1

### FIXED CODE ###

input_line = input()

if input_line.isupper() == True:
  print("A")
else:
  print("a")
a,b=map(int,input().split())
x=[0,0,-1,1]
y=[-1,1,0,0]
d=[]
for i in range(b):
    d.append(list(input()))
    
    
for i in range(b):
    for j in range(a):
    
        if d[i][j] == '#':
        
            check=0
            
            for xv,yv in zip(x,y):
                if 0 <= xv + j < a  and 0 <= yv + i < b:
                    if d[i+yv][j+xv] == "#":
                        check=1
                        break
        
            if check==0:
                print("No")
                exit()
            
                        
print("Yes")


### FIXED CODE ###

N,M = map(int, input().split())
boards = [None] * N
passed = [[False] * M for i in range(N)]
for i in range(N):
    boards[i] = list(input())
for i in range(N):
    for j in range(M):
        if boards[i][j] == '#':
            if ((i < N - 1 and boards[i+1][j] == '#') or 
                (i >= 1 and boards [i-1][j] == '#') or 
                (j < M - 1 and boards[i][j+1] == '#') or
                (j >= 1 and boards[i][j-1] == '#')):
                    continue
            else:
                print('No')
                exit()
print('Yes')
# !/usr/bin python3
# -*- coding: utf-8 -*-

rgb = int(input().join())

if rgb % 4 == 0:
    print('YES')

else:
    print('NO')

### FIXED CODE ###

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

rgb = int(input().replace(" ", ""))

if rgb % 4 == 0:
    print('YES')

else:
    print('NO')
n = int(input())
e = [[int(i) for i in input().split()] for i in range(n)]

def f():
    for x in range(101):
        for y in range(101):
            flg = True
            H = e[0][2] + abs(x-e[0][0]) + abs(y-e[0][1])
            for e_ in e[1:]:
                if H != e_[2] + abs(x-e_[0]) + abs(y-e_[1]):
                    flg = False
                    break
            if flg:
                return (x, y, H)
result = f()
print("{} {} {}".format(result[0], result[1], result[2]) )

### FIXED CODE ###

n = int(input())
e = sorted([[int(i) for i in input().split()] for i in range(n)], key=lambda x:x[2])[::-1]

def f():
    for x in range(101):
        for y in range(101):
            flg = True
            H = e[0][2] + abs(x-e[0][0]) + abs(y-e[0][1])
            for e_ in e:
                if (e_[2] == 0):
                    if H > abs(x-e_[0]) + abs(y-e_[1]):
                        flg = False
                        break
                    else:
                        continue
                
                if H != e_[2] + abs(x-e_[0]) + abs(y-e_[1]):
                    flg = False
                    break
            if flg:
                return (x, y, H)
result = f()
print("{} {} {}".format(result[0], result[1], result[2]) )
n, k = int(input().split())
h = [int(input())) for _ in range(n)]
h.sort()
print(min([h[i+k-1]-h[i] for i in range(n-k+1)]) )

### FIXED CODE ###

n, k = map(int, input().split())
h = []
for i in range(n):
    h.append(int(input()))
h.sort()
d = [h[i+1]-h[i] for i in range(0, len(h)-1)]
S = 0
for i in range(k-1):
    S += d[i]
ans = S
for i in range(0, n-k):
    SS = S + d[i+k-1] - d[i]
    if SS <= ans:
        ans = SS
    S = SS
print(ans)
s = sorted(input())
    if s[0] == s[1] and s[2] == s[3] and s[0] != s[3]:
        print("yes")
    else:
        print("no")


### FIXED CODE ###

s = sorted(input())

if len(s) == 4:
    if s[0] == s[1] and s[2] == s[3] and s[0] != s[3]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
import numpy as np

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

if k <= a:
    sum = k * 1
elif a < k and k <= a + b:
    sum = a
elif a + b < k <= a + b + c:
    sum = a + (-1) * (k - a - b)

print(sum)


### FIXED CODE ###

s = input()
t = input()

if (s[:len(s)] == t[:len(s)]):
    print("Yes")
else:
    print("No")
a, b, c = sorted(map(int, input()))
if a + b == c:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b, c = sorted(map(int, input().split()))
if a + b == c:
  print("Yes")
else:
  print("No")
n = int(input())

ans = 0
for i in range(1, n+1, 2):
    tmp = 0
    for j in range(1, n/2):
        if i % j == 0:
            tmp += 1

    if tmp == 4:
        ans += 1

print(ans)


### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N+1, 2):
  tmp = 0
  for j in range(1, N+1):
    if i % j == 0:
      tmp += 1
  if tmp == 8:
    ans += 1
print(ans)
n,q=map(int,input().split())
ki=[[] for i in range(n+1)]
#ki[0]="null"

for i in range(n-1):
    a,b=map(int,input().split())
    ki[a].append(b)
    ki[b].append(a)

scores=[0 for i in range(n+1)]
#scores[0]="null"
for i in range(q):
    p,x=map(int,input().split())
    scores[p]+=x


ans=[0 for i in range(n+1)]
#ans[0]="null"
point=0

ed=[]

def tansa(n,point):
    global ed
    point+=scores[n]
    ed.append(n)
    for p in ki[n]:
        if not p in ed:
            tansa(p,point)
    else:
        ans[n]=point
        
tansa(1,0)

ans=ans[1:]
ans=[str(i) for i in ans]
print(" ".join(ans))

### FIXED CODE ###

n,q=map(int,input().split())
L=[[] for i in range(n+1)]
S=[0 for i in range(n+1)]
V=[0 for i in range(n+1)]

for _ in range(n-1):
    a,b=map(int,input().split())
    L[a].append(b)   
    L[b].append(a)

for _ in range(q):
    p,x=map(int,input().split())
    S[p]+=x


que=[1]
head=0
V[1]=1
while len(que)>head:
    now=que[head]
    head+=1
    for nex in L[now]:
        if V[nex]==0:
            V[nex]=1
            que.append(nex)
            S[nex]+=S[now]

print(" ".join([str(i) for i in S[1:]]))
N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
for i in range(0, 3N, 2):
  ans += a[i+1]
print(ans)

### FIXED CODE ###

N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
cnt = 0
for i in range(0, 3*N, 2):
  ans += a[i+1]
  cnt += 1
  if cnt == N:
    break
print(ans)
import sys
import math
readline = sys.stdin.readline

def main():
  p = 1000000007
  N = int(readline().strip())
  A = {}
  B = {}
  ans = 0
  for i in range(N):
    s = ''
    ai, bi = map(int, readline().split())
    if ai == 0 and bi == 0:
      ans += 1
      continue
    gi = math.gcd(ai, bi)
    ai = int(ai / gi)
    bi = int(bi / gi)
    if ai != 0 and bi != 0:
      if ai < 0 and bi < 0:
        ai = -ai
        bi = -bi
      elif ai < 0:
        ai = -ai
        s = '-'
      elif bi < 0:
        bi = -bi
        s = '-'
    elif ai == 0 and bi != 0:
      ai = 0
      bi = 1
    elif bi == 0 and ai != 0:
      ai = 1
      bi = 0
      s = '-'
    xi = s + str(ai) + '/' + str(bi)
    if s == '':
      s = '-'
    else:
      s = ''
    yi = s + str(bi) + '/' + str(ai)
    if xi in A:
      A[xi] += 1
    else:
      A[xi] = 1
      B[xi] = yi
    C = {}
    for i in B:
      if i in C:
        continue
      elif B[i] not in B:
        C[i] = [A[i], 0]
      elif B[i] in C:
        continue
      else:
        C[i] = [A[i], A[B[i]]]
  r = 1
  for i in C:
    r *= ((2**C[i][0])%p + (2**C[i][1])%p -1)
    r %= p
  r -= 1
  ans += r
  print(ans)

if __name__ == '__main__':
  main()

### FIXED CODE ###

import sys
import math
readline = sys.stdin.readline

def main():
  p = 1000000007
  N = int(readline().strip())
  A = {}
  ans = 0
  for i in range(N):
    s = ''
    ai, bi = map(int, readline().split())
    if ai == 0 and bi == 0:
      ans += 1
      ans %= p
      continue
    gi = math.gcd(ai, bi)
    ai //= gi
    bi //= gi
    if ai != 0 and bi != 0:
      if ai < 0 and bi < 0:
        ai *= -1
        bi *= -1
      elif ai < 0:
        ai *= -1
        s = '-'
      elif bi < 0:
        bi *= -1
        s = '-'
    elif ai == 0 and bi != 0:
      ai = 0
      bi = 1
    elif bi == 0 and ai != 0:
      ai = 1
      bi = 0
      s = '-'
    xi = s + str(ai) + '/' + str(bi)
    if s == '':
      s = '-'
    else:
      s = ''
    yi = s + str(bi) + '/' + str(ai)
    if xi in A:
      A[xi][0] += 1
      A[xi][0] %= p
    elif yi in A:
      A[yi][1] += 1
      A[yi][1] %= p
    else:
      A[xi] = [1, 0]
  r = 1
  for i in A:
    r *= (pow(2, A[i][0], p) + pow(2, A[i][1], p) -1)
    r %= p
  ans += r - 1
  ans %= p
  print(ans)

if __name__ == '__main__':
  main()
K = input()
S = input()
strings = ''
if len(K) >= len(S):
  print(S)
else:
  strings = str(S[:K]) + '...'
  print(strings)


### FIXED CODE ###

K = int(input())
S = input()
strings = ''
if K >= len(S):
  print(S)
else:
  strings = str(S[:K]) + '...'
  print(strings)
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1),dtype=np.int16)
for i in range(3,n+1):
    arr[0,i] = 1

for i in range(1,n+1):
    sum_ = 0
    for j in range(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)










### FIXED CODE ###

D,T,S = [int(i) for i in input().split()]
out = 'Yes' if D <= T * S else 'No'
print(out)
# 再帰関数
# 入力文字列の最大の正整数を返す
# def func( in_str: str, prev: str ):
#     if len(in_str) == 0:
#         return 0
#     for i in range(len(in_str)):
#         s = in_str[0:i+1]
#         if s == prev:
#             continue
#         else:
#             new_str = in_str[i+1:]
#             ret = func(new_str, s)
#             if ret == -1:
#                 continue
#             return 1 + ret
#
#     return -1

#再帰じゃない
def func( in_str: str ):
    result = 0
    prev =""
    new_str = in_str
    stack_str =[]
    stack_i = []
    stack_K = []
    K = 0
    old_i = 0
    is_separate = False
    while(True):
        num = len(new_str)
        if num == 0:
            break
        for i in range(old_i, num):
            s = new_str[0:i+1]
            if s == prev:
                is_separate = False
                continue
            else:
                # 分岐前に状態保存
                stack_str.append(new_str)
                stack_i.append(i+1)
                stack_K.append(K)

                new_str = new_str[i+1:]
                prev = s
                K += 1
                is_separate = True
                break;
        # 失敗したらスタックからもとに戻す
        if is_separate == False:
            new_str = stack_str.pop()
            old_i = stack_i.pop()
            K = stack_K.pop()
        else:
            old_i = 0

    return K

s = input()
#s="aabbaa"
#s="aaaccacabaldkfjadhjdhafidhkajhdkfjahdskjhfakhdkfaababc"*1000
#num = func( s, "")
num = func( s )

print(num)

### FIXED CODE ###

# 再帰関数
# 入力文字列の最大の正整数を返す
# def func( in_str: str, prev: str ):
#     if len(in_str) == 0:
#         return 0
#     for i in range(len(in_str)):
#         s = in_str[0:i+1]
#         if s == prev:
#             continue
#         else:
#             new_str = in_str[i+1:]
#             ret = func(new_str, s)
#             if ret == -1:
#                 continue
#             return 1 + ret
#
#     return -1

#再帰じゃない
def func( in_str: str ):
    prev =""
    num_in_str = len(in_str)
    new_str = in_str
    stack_str =[]
    stack_start = []
    stack_i = []
    stack_K = []
    K = 0
    old_i = 0
    is_separate = False
    while(True):
        num = len(new_str)
        if num == 0:
            break
        for i in range(old_i, num):
            s = new_str[0:i+1]
            if s == prev:
                is_separate = False
                continue
            else:
                # 分岐前に状態保存
                #stack_str.append(new_str)
                stack_start.append(num_in_str - len(new_str))
                stack_i.append(i+1)
                stack_K.append(K)

                new_str = new_str[i+1:]

                prev = s
                K += 1
                is_separate = True
                break
        # 失敗したらスタックからもとに戻す
        if is_separate == False:
            #new_str = stack_str.pop()
            start = stack_start.pop()
            new_str = in_str[start:]
            old_i = stack_i.pop()
            K = stack_K.pop()
        else:
            old_i = 0

    return K

s = input()
#s="aabbaa"
#s="aaaccacabaldkfjadhjdhafidhkajhdkfjahdskjhfakhdkfaababc"*1000
#num = func( s, "")
num = func( s )

print(num)
N = int(input())
S = N % 10
if(S == 0):
  print("pon")
else if(S == 1):
  print("pon")
else if(S == 6):
  print("pon")
else if(S == 8):
  print("pon")
else if(S == 3):
  print("bon")
else:
  print("hon")

### FIXED CODE ###

N = int(input())
S = N % 10
if(S == 0):
  print("pon")
elif(S == 1):
  print("pon")
elif(S == 6):
  print("pon")
elif(S == 8):
  print("pon")
elif(S == 3):
  print("bon")
else:
  print("hon")
d={}
n=int(input())
for i in range(n):
    s=input()
    if s in d: d[s]+=1
    else:      d[s] =1
n=int(input())
    s=input()
    if s in d: d[s]-=1
ans=chk=0
for i in d:
    ans=max(ans,d[i])
print(ans)

### FIXED CODE ###

d={}
n=int(input())
for i in range(n):
    s=input()
    if s in d: d[s]+=1
    else:      d[s] =1
n=int(input())
for i in range(n):
    s=input()
    if s in d: d[s]-=1
ans=chk=0
for i in d:
    ans=max(ans,d[i])
print(ans)
S = list(input())
for i in range(len(S)):
  if i % 2 == 0:
   	if s[i] == "R" or "U" or "D":
      continue
   	else:
      print("No")
      exit()
  else:
    if s[i] == "L" or "U" or "D":
      continue
    else:
      print("No")
      exit()
print("Yes")


### FIXED CODE ###

S = list(input())
for i in range(len(S)):
	if i % 2 == 0:
		if (S[i] == "R") or(S[i] ==  "U") or(S[i] ==  "D"):
			continue
		else:
			print("No")
			exit()
	else:
		if (S[i] == "L") or(S[i] ==  "U") or(S[i] ==  "D"):
			continue
		else:
			print("No")
			exit()
print("Yes")
#!/usr/bin/env python3
import sys
import networkx as nx

def solve(N: int, M: int, A: "List[int]", B: "List[int]"):
    G = nx.Graph()

    for i in range(1, N+1):
        G.add_node(i)

    for i in range(M):
        G.add_edge(A[i], B[i])

    if nx.is_connected(G):
        print(0)
    else:
        print(nx.number_connected_components(G)-1)
    return


# Generated by 1.1.7.1 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
    M = int(next(tokens))  # type: int
    A = [int()] * (M)  # type: "List[int]"
    B = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
    solve(N, M, A, B)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import networkx as nx

def solve(N: int, M: int, A: "List[int]", B: "List[int]"):
    G = nx.Graph()

    for i in range(1, N+1):
        G.add_node(i)

    for i in range(M):
        G.add_edge(A[i], B[i])

    if nx.is_connected(G):
        print(0)
    else:
        print(nx.number_connected_components(G)-1)
    return


# Generated by 1.1.7.1 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
    M = int(next(tokens))  # type: int
    A = [int()] * (M)  # type: "List[int]"
    B = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
    solve(N, M, A, B)

if __name__ == '__main__':
    main()
h, n = map(int, input().split()  ) #split()で分解したものを別々の変数に入れる
l = []
for i in range(n):
    l.append(input()) 

a = sum(l)

if h > a:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

h, n = map(int, input().split()  ) #split()で分解したものを別々の変数に入れる
l = list(map(int, input().split()))  

a = sum(l)

if h > a:
    print('No')
else:
    print('Yes')
N,M,K = list(map(int,input().split()))

# DFSテンプレ、計算量=O(N+M)
# N:頂点の数
# M:辺の数

G = [[] for _ in range(N)]
# graphの入力
for _ in range(M):
    a,b = list(map(int,input().split()))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
# print("G:",G)

KG = [[] for _ in range(N)]
# block graphの入力
for _ in range(K):
    a,b = list(map(int,input().split()))
    KG[a-1].append(b-1)
    KG[b-1].append(a-1)
# print("KG:",KG)

def dfs(G,v):
    # global l
    # nを訪問済みにする
    seen[v] = 1
    # l += 1
    # print(v+1)
    seenV.append(v)
    # vから行ける各頂点next_vについて
    for next_v in G[v]:
        if seen[next_v] == 1:
            continue
        else:
            dfs(G,next_v)

# Adj_size = [0]*N
# 全頂点を未訪問に初期化。
Adj = [0]*N
seen = [0]*N
Y = []
for v in range(N):
    # l = 0
    seenV = []
    if seen[v] == 0:
        dfs(G,v)
    
        # print("dfs done !!!")
    # print("v=",v+1,"seen:",seen)
    # print("l=",l)
    # print(seenV)
    
    for sv in seenV:
        # Adj_size[sv] = l
        Adj[sv] = seenV
    # print("Adj_size:",Adj_size)
    
    # 出力
    # y = Adj_size[v] - len(G[v])-1
    y = len(Adj[v]) - len(G[v])-1
    for k in KG[v]:
        if k in Adj[v]:
            y += -1
    # print("v=",v+1,"y=",y)
    Y.append(str(y))

# print("ADj",Adj)
# print("Y",Y)
# print("G",G)

print(" ".join(Y))



### FIXED CODE ###

def find(x):
    if par[x]<0:
        return x
    else:
        par[x]=find(par[x])
        return par[x]
 
def unite(x,y):
  x,y=find(x),find(y)
  if x!=y:
    if x>y:
        x,y=y,x
    par[x]+=par[y]
    par[y]=x
    
def same(x,y):
  return find(x)==find(y)
 
def size(x):
  return-par[find(x)]
 
N,M,K = map(int,input().split())
par=[-1]*N
B = [set() for _ in range(N)]
FF = [0]*N
for _ in range(M):
    a,b = map(int,input().split())
    unite(a-1,b-1)
    FF[a-1] += 1
    FF[b-1] += 1
# print(F)
for j in range(K):
    a,b = map(int,input().split())
    B[a-1].add(b-1)
    B[b-1].add(a-1)

Y = []
for i in range(N):
    y = size(i) - FF[i] -1
    for b in B[i]:
        if same(i,b):
            y += -1
    Y.append(str(y))
print(" ".join(Y))