CodeEff/ECCO huggingface dataset:
# Original solution
# AtCoder Beginner Contest 175
# B - Making Triangle

import bisect

N=int(eval(input()))
L=list(map(int,input().split()))

ans=0

for i in range (N):
    for j in range (i+1,N):
        for k in range (j+1,N):
            # print(i,j,k)
            a=min(L[i],L[j],L[k])
            c=max(L[i],L[j],L[k])
            b=(L[i]+L[j]+L[k]-a-c)
            if a+b>c and a<b<c:
                ans+=1

print(ans)

# Optimized solution
# AtCoder Beginner Contest 175
# B - Making Triangle

N=int(eval(input()))
L=list(map(int,input().split()))
L.sort()

ans=0

for i in range (N):
    for j in range (i+1,N):
        for k in range (j+1,N):
            if L[i]+L[j]>L[k] and L[i]<L[j]<L[k]:
                ans+=1

print(ans)
# Original solution
# coding: utf-8
from pdb import set_trace
from collections import Counter

N = int(eval(input()))
L = sorted(list(map(int, input().split(" "))), reverse=True)
C = dict(Counter(L))
L = sorted(list(set(L)), reverse=True)

if N<3 or len(L)<3:
    print((0))
    exit()
li = []
for xa, a in enumerate(L[:-2]):
    for xb, b in enumerate(L[xa+1:-1]):
        for xc, c in enumerate(L[xa+2:]):
            if a+b<c:
                break
            if a+b>c and b+c>a and c+a>b and a!=b and b!=c and c!=a:
                _li = sorted([xa, xb+xa+1, xc+xa+2])
                if _li in li:
                    continue
                li.append(_li)
cnt = 0
for l in li:
    a = C[L[l[0]]]
    b = C[L[l[1]]]
    c = C[L[l[2]]]
    cnt += (a * b * c)
print(cnt)

# Optimized solution
# coding: utf-8
from pdb import set_trace
#from collections import Counter
import itertools

N = int(eval(input()))
L = list(map(int, input().split(" ")))
# print(L)

# C = dict(Counter(L))
# L = sorted(list(set(L)), reverse=True)

# if N<3 or len(L)<3:
#     print(0)
#     exit()
# li = []
# for xa, a in enumerate(L[:-2]):
#     for xb, b in enumerate(L[xa+1:-1]):
#         for xc, c in enumerate(L[xa+2:]):
#             if a+b<c:
#                 break
#             if a+b>c and b+c>a and c+a>b and a!=b and b!=c and c!=a:
#                 _li = sorted([xa, xb+xa+1, xc+xa+2])
#                 if _li in li:
#                     continue
#                 li.append(_li)
# cnt = 0
# for l in li:
#     a = C[L[l[0]]]
#     b = C[L[l[1]]]
#     c = C[L[l[2]]]
#     cnt += (a * b * c)
# print(cnt)
cnt = 0
TRI = list(itertools.combinations(L, 3))
for tri in TRI:
    a, b, c = tri
    if a==b or b==c or c==a:
        continue
    elif a+b>c and a+c>b and b+c>a:
        cnt += 1
print(cnt)
# Original solution
n = int(eval(input()))
l = list(map(int, input().split()))
ans = 0
for i in range(n-2):
    for j in range(i + 1, n-1):
        for k in range(j + 1, n):
            if len({l[i], l[j], l[k]}) != 3:
                continue
            if l[i] + l[j] > l[k] and l[i] + l[k] > l[j] and l[j] + l[k] > l[i]:
                ans += 1
print(ans)


# Optimized solution
from itertools import combinations

n = int(eval(input()))
l = list(map(int, input().split()))
l.sort()
ans = 0

for li, lj, lk in combinations(l, 3):
    if li < lj < lk < li + lj:
        ans += 1
print(ans)
# Original solution
def main():
    n = int(eval(input()))
    l = sorted(list(map(int, input().split())), reverse=True)
    ll = len(l)
    ans = 0

    seen = []
    for i in range(ll):
        for j in range(i+1, ll):
            for k in range(j+1, ll):
                if len(set([l[i], l[j], l[k]])) != 3:
                    continue
                if l[j] + l[k] > l[i] and [i, j, k] not in seen:
                    ans += 1
                    seen.append([i, j, k])
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    l = list(map(int, input().split()))
    ll = len(l)
    ans = 0

    for i in range(ll):
        for j in range(i+1, ll):
            for k in range(j+1, ll):
                if len(set([l[i], l[j], l[k]])) != 3:
                    continue
                item = [l[i], l[j], l[k]]
                if max(item) < sum(item) - max(item):
                    ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
L = list(map(int, input().split()))

ans = 0
for i in range(1,2**N):
  bin_line = str(bin(i))
  bin_line = bin_line.replace('0b', '')

  line = []
  if bin_line.count('1') == 3:
    for j in range(len(bin_line)):
      if bin_line[j] == '1':
        line.append(L[N-len(bin_line)+j])
    if len(set(line)) == 3:
      if line[0]+line[1] > line[2] and line[0]+line[2] > line[1] and line[1]+line[2]>line[0]:
        ans += 1
print(ans)

# Optimized solution
N = int(eval(input()))
L = list(map(int, input().split()))

ans = 0
for i in range(0,N-2):
  for j in range(i+1,N-1):
    for k in range(j+1,N):
      if L[i] != L[j] and L[i] != L[k] and L[j] != L[k] and L[i]+L[j] > L[k] and L[i]+L[k] > L[j] and L[j]+L[k] > L[i]:
        ans += 1
print(ans)
# Original solution
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
n = int(eval(input()))
l = list(map(int, input().split()))
l = sorted(l)
t = defaultdict(int)
ans = 0
for x in combinations(l, 3):
    if x[0]!=x[1] and x[0]!=x[2] and x[1]!=x[2]:
        if x[0] + x[1] > x[2]:
            ans+=1
print(ans)

# Optimized solution
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
n = int(eval(input()))
l = list(map(int, input().split()))
l = sorted(l)
ans = 0
for x in combinations(l, 3):
    if x[0]!=x[1] and x[0]!=x[2] and x[1]!=x[2]:
        if x[0] + x[1] > x[2]:
            ans+=1
print(ans)
# Original solution
from itertools import combinations

[N],*li = [list(map(int,i.split())) for i in open(0)]
li = li[0]
count = 0
for k in combinations(li,3):
    k = sorted(list(k))
    if k[2]<k[0]+k[1] and k[0]!=k[1] and k[1]!= k[2]:
        count += 1
print(count)

# Optimized solution
N = int(eval(input()))
li = list(map(int,input().split()))

from itertools import combinations

ans = 0
for k in combinations(li,3):
    k = list(k)
    k.sort()
    if k[0]+k[1]>k[2] and k[0]!=k[1] and k[1]!=k[2]:
        ans += 1
print(ans)
# Original solution
N = int(eval(input()))
L_list = list(map(int, input().split()))

result = 0
ind = list(range(len(L_list)))
for i_1 in ind:
  ind_2 = list(range(i_1 + 1, len(L_list)))
  for i_2 in ind_2:
    ind_3 = list(range(i_2 + 1, len(L_list)))
    for i_3 in ind_3:
      if (L_list[i_1] + L_list[i_2] > L_list[i_3]) and (L_list[i_1] + L_list[i_3] > L_list[i_2]) and (L_list[i_3] + L_list[i_2] > L_list[i_1]):
        if (L_list[i_1] != L_list[i_2]) and (L_list[i_3] != L_list[i_2]) and (L_list[i_1] != L_list[i_3]): 
          result += 1
print(result)

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
a = sorted(a)
res = 0
for i in range(n):
  for j in range(i + 1, n):
    for k in range(j + 1, n):
      if len(set([a[i], a[j], a[k]])) < 3:
        continue
      if a[i] + a[j] > a[k]:
        res += 1
print(res)
# Original solution
from sys import setrecursionlimit

setrecursionlimit(3 * 10 ** 5)

class Node:
  def __init__(self, id):
    self.id = id
    self.children = []
    self.block_id_set = set()

  def add_child(self, node):
    self.children.append(node)

  def add_block(self, id):
    self.block_id_set.add(id)


def main():
  n, m, k = map(int, input().split(' '))
  nodes = tuple([Node(i) for i in range(n)])
  for _ in range(m):
    a, b = sorted(map(lambda x: int(x) - 1, input().split()))
    nodes[a].add_child(nodes[b])
    nodes[b].add_child(nodes[a])

  for _ in range(k):
    c, d = sorted(map(lambda x: int(x) - 1, input().split()))
    nodes[c].add_block(d)
    nodes[d].add_block(c)

  total_done_set = set()

  def dfs(node, done_set):
    if node.id in done_set: return 0

    total_done_set.add(node.id)
    done_set.add(node.id)

    size = 1
    for child in node.children:
      size += dfs(child, done_set)

    return size


  ans_list = [-1] * n

  def dfs2(node, connected_ids, total_len):
    ans_list[node.id] = total_len - len(list(filter(
      lambda block_id: block_id in connected_ids,
      node.block_id_set
    ))) - 1

    except_num = 0
    for child in node.children:
      if child.id not in node.block_id_set:
        except_num += 1

      if ans_list[child.id] == -1:
        dfs2(child, connected_ids, total_len)

    ans_list[node.id] -= except_num


  for base_node in nodes:
    if base_node.id not in total_done_set:
      done_set = set()
      dfs(base_node, done_set)
      dfs2(base_node, done_set, len(done_set))

  print(*ans_list, sep=" ")


main()


# Optimized solution
from sys import setrecursionlimit

setrecursionlimit(3 * 10 ** 5)

def main():
  n, m, k = map(int, input().split(' '))
  nodes = tuple([([], set()) for i in range(n)])
  for _ in range(m):
    a, b = sorted(map(lambda x: int(x) - 1, input().split()))
    nodes[a][0].append(b)
    nodes[b][0].append(a)

  for _ in range(k):
    c, d = sorted(map(lambda x: int(x) - 1, input().split()))
    nodes[c][1].add(d)
    nodes[d][1].add(c)

  total_done_set = set()

  def dfs(node_id, done_set):
    if node_id in done_set: return 0

    total_done_set.add(node_id)
    done_set.add(node_id)

    size = 1
    for child_id in nodes[node_id][0]:
      size += dfs(child_id, done_set)

    return size


  ans_list = [-1] * n

  def dfs2(node_id, connected_ids, total_len):
    children, block_id_set = nodes[node_id]
    ans_list[node_id] = total_len - len(list(filter(
      lambda block_id: block_id in connected_ids, block_id_set
    ))) - 1

    except_num = 0
    for child_id in children:
      if child_id not in block_id_set:
        except_num += 1

      if ans_list[child_id] == -1:
        dfs2(child_id, connected_ids, total_len)

    ans_list[node_id] -= except_num


  for i in range(n):
    if i not in total_done_set:
      done_set = set()
      dfs(i, done_set)
      dfs2(i, done_set, len(done_set))

  print(*ans_list, sep=" ")


main()
# Original solution
n,m,k=list(map(int,input().split()))

class UF():
  def __init__(self, N):
    self._parent=[n for n in range(0, N)]
    self._size=[1] * N

  def find_root(self, x):
    if self._parent[x]==x:return x
    self._parent[x]=self.find_root(self._parent[x])
    return self._parent[x]

  def unite(self, x, y):
    gx=self.find_root(x)
    gy=self.find_root(y)
    if gx==gy:return

    if self._size[gx]<self._size[gy]:
      self._parent[gx]=gy
      self._size[gy]+=self._size[gx]
    else:
      self._parent[gy]=gx
      self._size[gx]+=self._size[gy]

  def size(self, x):
    return self._size[self.find_root(x)]

  def samegroup(self, x, y):
    return self.find_root(x)==self.find_root(y)

  def groupnum(self):
    N=len(self._parent)
    ans=0
    for i in range(N):
      if self.find_root(i)==i:
        ans+=1
    return ans

cf=[[] for i in range(n)]
cb=[[] for i in range(n)]

UFa=UF(n)
UFb=UF(n)
for i in range(m):
  x,y=list(map(int,input().split()))
  UFa.unite(x-1,y-1)
  UFb.unite(x-1,y-1)
  cf[x-1].append(y-1)
  cf[y-1].append(x-1)
UFa.groupnum()

for i in range(k):
  x,y=list(map(int,input().split()))
  cb[x-1].append(y-1)
  cb[y-1].append(x-1)

ans=[]
for i in range(n):
  x=(UFa.size(i)-1)-len(cf[i])
  for j in range(len(cb[i])):
    if UFa.samegroup(i,cb[i][j]):
      x-=1
  ans.append(str(x))
print((' '.join(ans)))

# Optimized solution
import sys
input=sys.stdin.readline
n,m,k=list(map(int,input().split()))

class UF():
  def __init__(self, N):
    self._parent=[n for n in range(0, N)]
    self._size=[1] * N

  def find_root(self, x):
    if self._parent[x]==x:return x
    self._parent[x]=self.find_root(self._parent[x])
    return self._parent[x]

  def unite(self, x, y):
    gx=self.find_root(x)
    gy=self.find_root(y)
    if gx==gy:return

    if self._size[gx]<self._size[gy]:
      self._parent[gx]=gy
      self._size[gy]+=self._size[gx]
    else:
      self._parent[gy]=gx
      self._size[gx]+=self._size[gy]

  def size(self, x):
    return self._size[self.find_root(x)]

  def samegroup(self, x, y):
    return self.find_root(x)==self.find_root(y)

  def groupnum(self):
    N=len(self._parent)
    ans=0
    for i in range(N):
      if self.find_root(i)==i:
        ans+=1
    return ans

cf=[[] for i in range(n)]
cb=[[] for i in range(n)]

UFa=UF(n)
UFb=UF(n)
for i in range(m):
  x,y=list(map(int,input().split()))
  UFa.unite(x-1,y-1)
  UFb.unite(x-1,y-1)
  cf[x-1].append(y-1)
  cf[y-1].append(x-1)
UFa.groupnum()

for i in range(k):
  x,y=list(map(int,input().split()))
  cb[x-1].append(y-1)
  cb[y-1].append(x-1)

ans=[]
for i in range(n):
  x=(UFa.size(i)-1)-len(cf[i])
  for j in range(len(cb[i])):
    if UFa.samegroup(i,cb[i][j]):
      x-=1
  ans.append(str(x))
print((' '.join(ans)))
# Original solution
import sys
input=sys.stdin.readline
n,m,k=list(map(int,input().split()))

class UF():
  def __init__(self, N):
    self._parent=[n for n in range(0, N)]
    self._size=[1] * N

  def find_root(self, x):
    if self._parent[x]==x:return x
    self._parent[x]=self.find_root(self._parent[x])
    return self._parent[x]

  def unite(self, x, y):
    gx=self.find_root(x)
    gy=self.find_root(y)
    if gx==gy:return

    if self._size[gx]<self._size[gy]:
      self._parent[gx]=gy
      self._size[gy]+=self._size[gx]
    else:
      self._parent[gy]=gx
      self._size[gx]+=self._size[gy]

  def size(self, x):
    return self._size[self.find_root(x)]

  def samegroup(self, x, y):
    return self.find_root(x)==self.find_root(y)

  def groupnum(self):
    N=len(self._parent)
    ans=0
    for i in range(N):
      if self.find_root(i)==i:
        ans+=1
    return ans

cf=[[] for i in range(n)]
cb=[[] for i in range(n)]

UFa=UF(n)
UFb=UF(n)
for i in range(m):
  x,y=list(map(int,input().split()))
  UFa.unite(x-1,y-1)
  UFb.unite(x-1,y-1)
  cf[x-1].append(y-1)
  cf[y-1].append(x-1)
UFa.groupnum()

for i in range(k):
  x,y=list(map(int,input().split()))
  cb[x-1].append(y-1)
  cb[y-1].append(x-1)

ans=[]
for i in range(n):
  x=(UFa.size(i)-1)-len(cf[i])
  for j in range(len(cb[i])):
    if UFa.samegroup(i,cb[i][j]):
      x-=1
  ans.append(str(x))
print((' '.join(ans)))

# Optimized solution
import sys
input=sys.stdin.readline
n,m,k=list(map(int,input().split()))

class UF():
  def __init__(self, N):
    self._parent=[n for n in range(0, N)]
    self._size=[1] * N

  def find_root(self, x):
    if self._parent[x]==x:return x
    self._parent[x]=self.find_root(self._parent[x])
    return self._parent[x]

  def unite(self, x, y):
    gx=self.find_root(x)
    gy=self.find_root(y)
    if gx==gy:return

    if self._size[gx]<self._size[gy]:
      self._parent[gx]=gy
      self._size[gy]+=self._size[gx]
    else:
      self._parent[gy]=gx
      self._size[gx]+=self._size[gy]

  def size(self, x):
    return self._size[self.find_root(x)]

  def samegroup(self, x, y):
    return self.find_root(x)==self.find_root(y)

  def groupnum(self):
    N=len(self._parent)
    ans=0
    for i in range(N):
      if self.find_root(i)==i:
        ans+=1
    return ans

cf=[[] for i in range(n)]
cb=[[] for i in range(n)]

UFa=UF(n)
for i in range(m):
  x,y=list(map(int,input().split()))
  UFa.unite(x-1,y-1)
  cf[x-1].append(y-1)
  cf[y-1].append(x-1)
UFa.groupnum()

for i in range(k):
  x,y=list(map(int,input().split()))
  cb[x-1].append(y-1)
  cb[y-1].append(x-1)

ans=[]
for i in range(n):
  x=(UFa.size(i)-1)-len(cf[i])
  for j in range(len(cb[i])):
    if UFa.samegroup(i,cb[i][j]):
      x-=1
  ans.append(str(x))
print((' '.join(ans)))
# Original solution
import sys
sys.setrecursionlimit(10**9)

N, M, K = list(map(int, input().split()))
G = [[] for _ in range(N)]
AB = []
for _ in range(M):
    a, b = list(map(int, input().split()))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
    AB.append((a-1, b-1))

H = [[] for _ in range(N)]
for _ in range(K):
    c, d = list(map(int, input().split()))
    H[c-1].append(d-1)
    H[d-1].append(c-1)

seen = [0]*N
def dfs(v):
    seen[v] = 1
    ret = [v]
    for u in G[v]:
        if seen[u] == 1: continue
        ret += dfs(u)
    return ret

num = [0]*N
for v in range(N):
    if seen[v] == 1: continue
    new = dfs(v)
    size = len(new)
    for n in new:
        num[n] = len(set(new) - set(H[n]) - set(G[n])) - 1
    
print((' '.join(map(str, num))))



# Optimized solution
#Union Find

#xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]

#xとyの属する集合の併合
def unite(x,y):
    x = find(x)
    y = find(y)
    
    if x == y:
        return False
    else:
        #sizeの大きいほうがx
        if par[x] > par[y]:
            x,y = y,x
        par[x] += par[y]
        par[y] = x
        return True

#xとyが同じ集合に属するかの判定
def same(x,y):
    return find(x) == find(y)

#xが属する集合の個数
def size(x):
    return -par[find(x)]


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

#初期化
#根なら-size,子なら親の頂点
par = [-1]*N

G = [[] for _ in range(N)]
for _ in range(M):
    a, b = list(map(int, input().split()))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
    unite(a-1, b-1)

ans = [size(v) - len(G[v]) - 1 for v in range(N)]

H = [[] for _ in range(N)]
for _ in range(K):
    c, d = list(map(int, input().split()))
    if same(c-1, d-1):
        ans[c-1] -= 1
        ans[d-1] -= 1
    
print((' '.join(map(str, ans))))
# Original solution
# coding: utf-8
import sys
sysread = sys.stdin.readline
from collections import defaultdict
sys.setrecursionlimit(10**7)
def run():

    N,M,K = list(map(int,sysread().split()))
    to = [[] for _ in range(N+1)]
    n_to = [0 for _ in range(N + 1)]
    for i in range(1,M+1):
        a,b = list(map(int, sysread().split()))
        #a,b = AB[i]
        to[a].append(b)
        n_to[a] += 1
        to[b].append(a)
        n_to[b] += 1

    stack = defaultdict(lambda:0)
    visited = [False] * (N+1)
    belong = [None] * (N+1)


    def dfs(n):
        _stack = [n]
        visited[n] = True
        while _stack:
            node = _stack.pop()
            stack[n] += 1
            belong[node] = n
            for next in to[node]:
                if not visited[next]:
                    _stack.append(next)
                    visited[next] = True
        return None


    for i in range(1,N+1):
        if not visited[i]:
            dfs(i)

    block = [0 for _ in range(N+1)]
    for i in range(1, K+1):
        c,d = list(map(int, sysread().split()))
        #c, d = CD[i]
        if belong[c] == belong[d]:
            block[c] += 1
            block[d] += 1

    candidates = [0] * (N+1)

    for tree in list(stack.keys()):
        for k in range(1,N+1):
            tr = belong[k]
            candidates[k] = stack[tr] - 1 - n_to[k] - block[k]

    print((' '.join(map(str, candidates[1:]))))

if __name__ == "__main__":
    run()

# Optimized solution
# coding: utf-8
import sys
sysread = sys.stdin.readline
from collections import defaultdict
sys.setrecursionlimit(10**7)
def run():

    N,M,K = list(map(int,sysread().split()))
    to = [[] for _ in range(N+1)]
    n_to = [0 for _ in range(N + 1)]
    for i in range(1,M+1):
        a,b = list(map(int, sysread().split()))
        #a,b = AB[i]
        to[a].append(b)
        n_to[a] += 1
        to[b].append(a)
        n_to[b] += 1

    stack = defaultdict(lambda:0)
    visited = [False] * (N+1)
    belong = [None] * (N+1)


    def dfs(n):
        _stack = [n]
        visited[n] = True
        while _stack:
            node = _stack.pop()
            stack[n] += 1
            belong[node] = n
            for next in to[node]:
                if not visited[next]:
                    _stack.append(next)
                    visited[next] = True
        return None


    for i in range(1,N+1):
        if not visited[i]:
            dfs(i)

    block = [0 for _ in range(N+1)]
    for i in range(1, K+1):
        c,d = list(map(int, sysread().split()))
        #c, d = CD[i]
        if belong[c] == belong[d]:
            block[c] += 1
            block[d] += 1

    candidates = [0] * (N+1)

    for k in range(1,N+1):
        tr = belong[k]
        candidates[k] = stack[tr] - 1 - n_to[k] - block[k]

    print((' '.join(map(str, candidates[1:]))))

if __name__ == "__main__":
    run()
# Original solution
class UnionFind:

    def __init__(self, n):
        self.t = [-1] * (n + 1)

    def flatten(self):
        for i, _ in enumerate(self.t):
            self.find_root(i)

    def union(self, a, b):
        ra = self.find_root(a)
        rb = self.find_root(b)
        if ra != rb:
            self.t[max(ra, rb)] = min(ra, rb)

    def find_root(self, x):
        t = []
        while self.t[x] > 0:
            t.append(x)
            x = self.t[x]
        for _t in t:
            self.t[_t] = x
        return x


def solve(string):
    n, m, k, *abcd = list(map(int, string.split()))
    ab, cd = abcd[:2 * m], abcd[2 * m:]
    fr, br = [0] * (n + 1), [0] * (n + 1)
    uf = UnionFind(n)
    for a, b in zip(*[iter(ab)] * 2):
        fr[a] += 1
        fr[b] += 1
        uf.union(a, b)
    uf.flatten()
    for i, v in enumerate(uf.t):
        if v < 0:
            uf.t[i] = i
    mp = {k: [] for k in set(uf.t[1:])}
    for i, v in enumerate(uf.t[1:], start=1):
        mp[v].append(i)
    for c, d in zip(*[iter(cd)] * 2):
        br[c] += 1 if d in mp[uf.t[c]] else 0
        br[d] += 1 if c in mp[uf.t[d]] else 0
    mp = {k: len(v) for k, v in list(mp.items())}
    return " ".join([str(mp[uf.t[i]] - 1 - fr[i] - br[i]) for i in range(1, n + 1)])


if __name__ == '__main__':
    import sys
    print((solve(sys.stdin.read().strip())))


# Optimized solution
class UnionFind:

    def __init__(self, n):
        self.t = [-1] * (n + 1)

    def flatten(self):
        for i, _ in enumerate(self.t):
            self.find_root(i)

    def union(self, a, b):
        ra = self.find_root(a)
        rb = self.find_root(b)
        if ra != rb:
            self.t[max(ra, rb)] = min(ra, rb)

    def find_root(self, x):
        t = []
        while self.t[x] > 0:
            t.append(x)
            x = self.t[x]
        for _t in t:
            self.t[_t] = x
        return x


def solve(string):
    n, m, k, *abcd = list(map(int, string.split()))
    ab, cd = abcd[:2 * m], abcd[2 * m:]
    r = [0] * (n + 1)
    uf = UnionFind(n)
    for a, b in zip(*[iter(ab)] * 2):
        r[a] += 1
        r[b] += 1
        uf.union(a, b)
    uf.flatten()
    for i, v in enumerate(uf.t):
        if v < 0:
            uf.t[i] = i
    mp = {k: [] for k in set(uf.t[1:])}
    for i, v in enumerate(uf.t[1:], start=1):
        mp[v].append(i)
    mp = {k: set(v) for k, v in list(mp.items())}
    for c, d in zip(*[iter(cd)] * 2):
        r[c] += 1 if d in mp[uf.t[c]] else 0
        r[d] += 1 if c in mp[uf.t[d]] else 0
    mp = {k: len(v) for k, v in list(mp.items())}
    return " ".join([str(mp[uf.t[i]] - 1 - r[i]) for i in range(1, n + 1)])


if __name__ == '__main__':
    import sys
    print((solve(sys.stdin.read().strip())))