Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import numpy as np

n = list(map(int, input().split()))
a = np.array(n[0] * n[1])

for i in range(n[0]):
    a_line = list(map(int, input().split()))
    np.append(a, a_line)
a.reshape(n[0], n[1])

b = np.array(n[1])
for i in range(n[1]):
    b_column = list(map(int, input().split()))
    np.append(b_column)
b.reshape(n[0], 1)

ab_sum = np.dot(a, b)

for i in range(n[1]):
    print('{0}'.format(ab_sum[i]))


### FIXED CODE ###

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

for i in range(n[0]):
    a.append(list(map(int, input().split())))

for i in range(n[1]):
    b.append(int(input()))

for i in range(n[0]):
    ab_sum = 0
    for j in range(n[1]):
        ab_sum += a[i][j] * b[j]
    print(ab_sum)
#136c
N = int(input())
H_list = [int(e) for e in input().split()]

H_list[0] -= 1 #最初の奴は減らしても影響なし。

for i in range(1,N):
    print(H_list)
    print(H_list[i-1],H_list[i])
    
    if H_list[i-1] < H_list[i]:
        H_list[i] -= 1
    
    if H_list[i-1] > H_list[i]:
        print("No")
        break
else:
    print("Yes")

### FIXED CODE ###

#136c
N = int(input())
H_list = [int(e) for e in input().split()]

H_list[0] -= 1 #最初の奴は減らしても影響なし。

for i in range(1,N):
    #print(H_list)
    #print(H_list[i-1],H_list[i])
    
    if H_list[i-1] < H_list[i]:
        H_list[i] -= 1
    
    if H_list[i-1] > H_list[i]:
        print("No")
        break
else:
    print("Yes")
N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy.sort()
from collections import defaultdict
d = defaultdict(int)
for i in range(N):
    for j in range(i+1,N):
        tmp = (xy[j][0]-xy[i][0],xy[j][1]-xy[i][1])
        d[tmp] += 1
print(N-max(d.values()))

### FIXED CODE ###

N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy.sort()
from collections import defaultdict
d = defaultdict(int)
for i in range(N):
    for j in range(i+1,N):
        tmp = (xy[j][0]-xy[i][0],xy[j][1]-xy[i][1])
        d[tmp] += 1
if N == 1:
    print(1)
else:
    print(N-max(d.values()))
N, X = map(int,input().split())

lis = list(map(int,input().split()))
i = 0
sum = 0
while  sum <= X:
  sum += lis[i]
  i += 1
print(i)

### FIXED CODE ###

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

lis = list(map(int,input().split()))
count = 1
sm = 0
for l in lis:
  sm += l
  if sm > X:
    break
  count += 1
print(count)
N = int(input())
G = [[] for i in range(N)]
for i in range(N - 1):
    a, b, c = map(int, input().split())
    G[a - 1].append((b - 1, c))
    G[b - 1].append((a - 1, c))

Q, K = map(int, input().split())
dist = [-1] * N


def dfs(u, par, d):
    dist[u] = d
    for w, cost in G[u]:
        if w == par:
            continue
        dfs(w, u, d + cost)


dfs(K - 1, -1, 0)

for i in range(Q):
    x, y = map(int, input().split())
    x, y = x - 1, y - 1
    print(dist[x] + dist[y])





### FIXED CODE ###

from heapq import heappush, heappop
from collections import deque
N = int(input())
G = [[] for i in range(N)]
for i in range(N - 1):
    a, b, c = map(int, input().split())
    a, b = a - 1, b - 1
    G[a].append((b, c))
    G[b].append((a, c))

Q, K = map(int, input().split())
K -= 1

INF = float("inf")
d = [INF] * N
d[K] = 0
que = [(0, K)]
while que:
    cost, v = heappop(que)
    if d[v] < cost:
        continue
    for w, c in G[v]:
        if d[v] + c < d[w]:
            d[w] = d[v] + c
            heappush(que, (d[w], w))

for i in range(Q):
    x, y = map(int, input().split())
    print(d[x - 1] + d[y - 1])
a,b=map(int,input().split())
#値の入力
if(2*a<=b):
    if(b<=4*a):
        print("Yes")
    else:
        pirnt("No")
else:
    print("No")

### FIXED CODE ###

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

if(b%2==0):
    if(2*a<=b<=4*a):
        print("Yes")
    else:
        print("No")
else:
    print("No")
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
N, M, S, T = [int(_) for _ in input().split()]
UVAB = [[int(_) for _ in input().split()] for _ in range(M)]
G1 = [[0] * N for _ in range(N)]
G2 = [[0] * N for _ in range(N)]

for u, v, a, b in UVAB:
    u -= 1
    v -= 1
    G1[u][v] = G1[v][u] = a
    G2[u][v] = G2[v][u] = b


def dijkstra(V, G, i):
    INF = float('inf')

    H = []
    d = 0
    D = [INF] * V
    D[i] = 0
    used = [False] * V
    used[i] = True

    while True:
        for j in G[i].keys():
            heapq.heappush(H, (d + G[i][j], j))
        v = -1
        while H:
            d, j = heapq.heappop(H)
            if not used[j]:
                v = j
                break
        if v == -1:
            break
        else:
            used[v] = True
            D[v] = d
            i = v
    return D


D1 = dijkstra(N, G1, S - 1)
D2 = dijkstra(N, G2, T - 1)

D = list(
    itertools.accumulate(
        [10**15 - sum(_) for _ in zip(D1, D2)][::-1], func=max))[::-1]
print(*D, sep='\n')


### FIXED CODE ###

import math, string, itertools, fractions, collections, re, array, bisect, sys, random, time, copy, functools
from heapq import heappush, heappop, heappushpop, heapify, heapreplace
input = sys.stdin.readline

N, M, S, T = [int(_) for _ in input().split()]
UVAB = [[int(_) for _ in input().split()] for _ in range(M)]
G1 = collections.defaultdict(lambda: collections.defaultdict(int))
G2 = collections.defaultdict(lambda: collections.defaultdict(int))

for u, v, a, b in UVAB:
    u -= 1
    v -= 1
    G1[u][v] = G1[v][u] = a
    G2[u][v] = G2[v][u] = b


def dijkstra(V, G, start):
    INF = float('inf')
    D = [INF for _ in range(V)]
    D[start] = 0
    H = [(0, start)]
    while H:
        du, u = heappop(H)
        if D[u] < du:
            continue
        for v, d in G[u].items():
            if D[v] > du + d:
                D[v] = du + d
                heappush(H, (D[v], v))
    return D


D1 = dijkstra(N, G1, S - 1)
D2 = dijkstra(N, G2, T - 1)

D = [10**15 - sum(_) for _ in zip(D1, D2)]
for i in range(N - 1, 0, -1):
    D[i - 1] = max(D[i - 1], D[i])
print(*D, sep='\n')
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq

n,k = ma()
A = lma()
bu = []
for i in range(n):
    tmp=0
    for j in range(i,n):
        tmp+=A[j]
        bu.append(tmp)
mb = bin(max(bu))
ans = 0
for i in range(len(mb)-3,-1,-1):
    tmp=[]
    for b in bu:
        if (b>>i &1):
            tmp.append(b)
    if len(tmp2)>=k:
        ans+=2**i
        bu=tmp
    else:
        pass
print(ans)


### FIXED CODE ###

ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq

n,k = ma()
A = lma()
bu = []
for i in range(n):
    tmp=0
    for j in range(i,n):
        tmp+=A[j]
        bu.append(tmp)
mb = bin(max(bu))
ls = [0]*(len(mb)-2)
for b in bu:
    for i in range(len(bin(b))-2):
        if (b>>i &1):
            ls[i]+=1
ans = 0
tmp=bu
for i in range(len(mb)-3,-1,-1):
    if ls[i]<k:
        continue
    tmp2=[]
    for b in tmp:
        if (b>>i &1):
            tmp2.append(b)
    if len(tmp2)>=k:
        ans+=2**i
        tmp=tmp2
    else:
        pass
print(ans)
from itertools import combinations
from heapq import heappush, heappop

def dist(p1, p2): return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2) ** 0.5
    
xs, ys, xt, yt = map(int, input().split())
N = int(input())
P = [[(xs, ys), 0, 0], [(xt, yt), 0, 1]]
for i in range(2, N+2):
    x, y, r = map(int, input().split())
    P.append([(x, y), r, i])
E = [[float('inf')] * (N+2) for _ in range(N+2)]
for v in range(N): E[v][v] = 0
for [p1, r1, i], [p2, r2, j] in combinations(P, 2):
    d = max(0, dist(p1, p2) - (r1 + r2))
    E[i][j] = E[j][i] = d
dist = [float('inf')] * N # the distance of each vertex from s
prev = [-1] * N # the previous vertex of each vertex on a shortest path from s
visited = [False] * N
n_visited = 0 # #(visited vertices)
heap = []
heappush(heap, (0, -1, 0))
while heap:
    d, p, v = heappop(heap)
    if visited[v]: continue # (s,v)-shortest path is already calculated
    dist[v] = d; prev[v] = p; visited[v] = True
    n_visited += 1
    if n_visited == N: break
    for u in range(N):
        if visited[u]: continue
        temp = d + E[v][u]
        if dist[u] > temp: heappush(heap, (temp, v, u))
print(dist[1])

### FIXED CODE ###

from itertools import combinations
from heapq import heappush, heappop

class Dijkstra:
    def __init__(self, N):
        self.N = N # #vertices
        self.E = [[] for _ in range(N)]

    def add_edge(self, init, end, weight, undirected=False):
        self.E[init].append((end, weight))
        if undirected: self.E[end].append((init, weight))
    
    def distance(self, s):
        INF = float('inf')
        E, N = self.E, self.N
        self.dist = dist = [INF] * N # the distance of each vertex from s
        self.prev = prev = [-1] * N # the previous vertex of each vertex on a shortest path from s
        dist[s] = 0
        n_visited = 1 # #(visited vertices)
        heap = []
        heappush(heap, (0, s))
        while heap:
            d, v = heappop(heap)
            if dist[v] < d: continue
            for u, c in E[v]:
                temp = d + c
                if dist[u] > temp:
                    dist[u] = temp; prev[u] = v
                    heappush(heap, (temp, u))
            n_visited += 1
            if n_visited == N: break
        return dist
    
    def shortest_path(self, t):
        P = []
        prev = self.prev
        while True:
            P.append(t)
            t = prev[t]
            if t == -1: break
        return P[::-1]

def dist(p1, p2): return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2) ** 0.5
    
xs, ys, xt, yt = map(int, input().split())
N = int(input())
P = [[(xs, ys), 0, 0], [(xt, yt), 0, 1]]
for i in range(2, N+2):
    x, y, r = map(int, input().split())
    P.append([(x, y), r, i])
dk = Dijkstra(N+2)
for [p1, r1, i], [p2, r2, j] in combinations(P, 2):
    d = max(0, dist(p1, p2) - (r1 + r2))
    dk.add_edge(i, j, d, undirected=True)
print(dk.distance(0)[1])
A = map(int, input().split())
if A.sort() == [5,5,7]:
  print("YES")
eles:
  print("NO")

### FIXED CODE ###

A = list(map(int, input().split()))
A.sort()
if A == [5,5,7]:
  print("YES")
else:
  print("NO")
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# import numpy as np
sys.setrecursionlimit(int(pow(10,6)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("out.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

# @lru_cache(None)

t=1
# t=int(input())
for _ in range(t):
    n,k=L()
    A=L()
    A.sort()
    x=bl(A,0)
    y=br(A,0)
    neg=A[:x]
    pos=A[y:][::-1]
    if len(pos)==0:
        neg=neg[::-1]
        neg=[1]+neg
        for i in range(1,len(neg)):
            neg[i]*=neg[i-1]
        print(neg[k]%mod)
        exit()
    
    neg=[1]+neg
    for i in range(1,len(neg)):
        neg[i]*=neg[i-1]

    pos=[1]+pos
    for i in range(1,len(pos)):
        pos[i]*=pos[i-1]
    mx=neg[min(k,len(neg)-1)]
    for i in range(0,len(neg),2):
        if (k-i)>=0 and (k-i)<len(pos):
            curr=neg[i]*pos[(k-i)]
            mx=max(curr,mx)

    # print(mx)
    print(mx%mod)




### FIXED CODE ###

M=10**9+7
n,k,*a=map(int,open(y:=0).read().split())
a.sort()
x=s=1
r=k
while r>1:
 if(t:=a[y]*a[y+1])>a[-x]*a[~x]:s=s*t%M;y+=2;r-=2
 else:s=s*a[-x]%M;x+=1;r-=1
if r:s*=a[-x]
if a[-1]<0<k%2:
 s=1
 for i in a[-k:]:s=s*i%M
print(s%M)
import math
while 1:
	n = int(raw_input())
	if n == 0:
		break
	count = 0
	for p in range(n+1,2*n+1):
		for d in range(2, int(math.sqrt(p)) + 1):
			if p != d and  p % d == 0:
				break
		else:
			count += 1
	print count

### FIXED CODE ###

import math
MAX = 123456
def sieve (n):
	prime = [0,0]
	prime += [1 for i in range(n-1)]
	ub = math.sqrt(n) + 1
	d = 2
	while d <= ub:
		if prime[d] == 0:
			d += 1
			continue
		prod = 2
		while d * prod <= n:
			prime[d*prod] = 0
			prod += 1
		d += 1
	return prime
prime = sieve(2 * MAX)
while 1:
	n = int(raw_input())
	if n == 0:
		break
	print sum(prime[n+1:2*n+1])
from collections import deque
N = int(input())
G = {i:[] for i in range(1,N+1)}
for _ in range(N-1):
    a,b = map(int,input().split())
    G[a].append(b)
    G[b].append(a)
C = sorted(list(map(int,input().split())))
hist = [0 for _ in range(N+1)]
que = deque([1])
hist[1] = 1
cur = 0
while que:
    i = que.popleft()
    if len(G[i])==1:
        A[i] = C[cur]
        cur += 1
        hist[i] = 2
    flag = 2
    for j in G[i]:
        if hist[j]==0:
            que.append(j)
            hist[j] = 1
            flag = 1
    if flag==2 and hist[i]==1:
        A[i] = C[cur]
        cur += 1
        hist[i] = 2
    elif hist[i]==1:
        que.append(i)
cnt = 0
hist = {(i,j):0 for i in range(1,N+1) for j in G[i]}
for i in range(1,N+1):
    for j in G[i]:
        if hist[(i,j)]==0:
            cnt += min(A[i],A[j])
            hist[(i,j)] = 1
            hist[(j,i)] = 1
print(cnt)
print(*A[1:])

### FIXED CODE ###

from collections import deque
N = int(input())
G = {i:[] for i in range(1,N+1)}
for _ in range(N-1):
    a,b = map(int,input().split())
    G[a].append(b)
    G[b].append(a)
C = sorted(list(map(int,input().split())))
A = [0 for _ in range(N+1)]
hist = [0 for _ in range(N+1)]
que = deque([1])
hist[1] = 1
cur = 0
while que:
    i = que[-1]
    if len(G[i])==1:
        A[i] = C[cur]
        cur += 1
        hist[i] = 2
        que.pop()
    flag = 2
    for j in G[i]:
        if hist[j]==0:
            que.append(j)
            hist[j] = 1
            flag = 1
    if flag==2 and hist[i]==1:
        A[i] = C[cur]
        cur += 1
        hist[i] = 2
        que.pop()
cnt = 0
hist = {(i,j):0 for i in range(1,N+1) for j in G[i]}
for i in range(1,N+1):
    for j in G[i]:
        if hist[(i,j)]==0:
            cnt += min(A[i],A[j])
            hist[(i,j)] = 1
            hist[(j,i)] = 1
print(cnt)
print(*A[1:])
N = [i for i in range(1, 10000)]
count = 0
for i in N:
    if i == 0:
        break
    else:
        count += 1
    print("Case " + str(count) + ": " + str(line))

### FIXED CODE ###

i = 0
while True:
    n = int(input())
    if n == 0: 
        break
    else:
        i += 1
    print("Case " + str(i) + ": " + str(n))
import math

n,q=map(int,input().split())
S=input()
A=[]
flag=0
for i in range(n):
    if S[i]=="A":
        flag=1
    elif S[i]=="C":
        if flag==1:
            A.append(i-1)
        flag=0
    else:
        flag=0
a=len(A)
        
for i in range(q):
    l,r=map(int,input().split())
    l-=1
    r-=1
    low=0
    high=a-1
    if A[0]>=l:
        cntl=0
    elif A[a-1]<l:
        print(0)
        continue
    else:
        while high-low>1:
            now=math.ceil((high+low)//2)
            if A[now]<=l:
                high=now
            else:
                low=now
        cntl=high
    low=0
    high=a-1
    if A[a-1]+1<=r:
        cntr=a-1
    elif A[0]+1>r:
        print(0)
        continue
    else:
        while high-low>1:
            now=(high+low)//2
            if A[now]+1<=r:
                low=now
            else:
                high=now
        cntr=low
    print(cntr-cntl+1)

### FIXED CODE ###

n,q=map(int,input().split())
S=input()
A=[]
flag=0
cnt=0
for i in range(n):
    if S[i]=="A":
        flag=1
    elif S[i]=="C":
        if flag==1:
            cnt+=1
        flag=0
    else:
        flag=0
    A.append(cnt)
    
for i in range(q):
    l,r=map(int,input().split())
    l-=1
    r-=1
    print(A[r]-A[l])
N = int(input())
n = [int(input()) for _ in range(N)]
min_n = min(n)
print(N // min_n + (1 if (0 != N % min_n) else 0) + N - 1)


### FIXED CODE ###

N = int(input())
n = [int(input()) for _ in range(5)]
min_n = min(n)
ans = N // min_n + 4 + (1 if (0 != N % min_n) else 0)
print(ans)
def get_sum_arr(arr):
    sum_arr = [0]
    N = len(arr)
    for i in range(1,N+1):
        sum_arr.append(sum_arr[i-1] + arr[i-1])
    return sum_arr

def get_max_b(left_time,j,B_sum_arr):
    # [0,1,2,3,4,5]
    while B_sum_arr[j] >= left_time and j > 0:
        j -= 1
    return j
def get_max_book_num(A,B,K):
    A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)
    count,i,j = 0,0,len(B_sum_arr)-1
    for i in range(0,len(A_sum_arr)):
        if K < A_sum_arr[i]:
            break
        else:
            left_time = K - A_sum_arr[i]
            j = get_max_b(left_time,j,B_sum_arr)
        count = max(count,(i+j))
    return count

if __name__ == "__main__":
    N,M,K = list(map(int,input().split()))
    A = list(map(int,input().split()))
     # [0,1,2,3,4,5]
    B = list(map(int,input().split()))
     # [0,1,2,3,4,5]
    print(get_max_book_num(A,B,K))
    


### FIXED CODE ###

a = int(input())
print(a+a**2+a**3)
import math
import sys
n, m = map(int, input().split())

def combinations_count(n, r):
    C = math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    return C

if n == 0 and m >= 2:
    print(combinations_count(m, 2))
    sys.exit()
elif n >= 2 and m == 0:
    print(combinations_count(n, 2))
    sys.exit()
elif n == m == 1:
    print(1)
    sys.exit()
elif n == m == 0:
    print(0)
    sys.exit()
else:
    print(combinations_count(n, 2) + combinations_count(m, 2))

### FIXED CODE ###

import math
import sys
n, m = map(int, input().split())

def combinations_count(n, r):
    C = math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    return C

if n <= 1 and m >= 2:
    print(combinations_count(m, 2))
    sys.exit()
elif n >= 2 and m <= 1:
    print(combinations_count(n, 2))
    sys.exit()
elif n == m == 1:
    print(0)
    sys.exit()
elif n == m == 0:
    print(0)
    sys.exit()
else:
    print(combinations_count(n, 2) + combinations_count(m, 2))
import sys

def wf(d):
  for i in range(n):
    for j in range(n):#start
      for k in range(n):#end
        d[j][k]=min(d[j][k], d[j][i] + d[i][k])
  return d

n,m,l = map(int, input().split())

d=[[sys.maxsize]*(n) for _ in range(n)]
e=[[sys.maxsize]*(n) for _ in range(n)]
for i in range(n):
  d[i][i] = 0
  e[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=wf(d)
for i in range(n):
  for j in range(n):
    if d[i][j] <= l:
      e[i][j] = 1

e=wf(e)

q=int(input())
for _ in range(q):
  s,t = map(int, input().split())
  if e[s-1][t-1] == sys.maxsize:
    print(-1)
  else:
    print(e[s-1][t-1]-1)


### FIXED CODE ###

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

if 2 * m <= n:
  print(n - 2 * m)
else:
  print(0)
n = int(input())

sum_ = 0
for i in range(1, n+1):
  if n%15 !=0:
    sum += i
    
print(sum_)

### FIXED CODE ###

n = int(input())

sum_ = 0
for i in range(1, n+1):
  if i%15 !=0 and i%3 !=0 and i%5 !=0:
    sum_ += i
    
print(sum_)
a = map(int, raw_input().strip().split())
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if a[0] == a[1] and a[2] == a[1]:
    print("No")
  else:
    print("Yes")
else:
  print("No)

### FIXED CODE ###

a = list(map(int, input().split()))
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if ((a[0] == a[1]) and (a[2] == a[1])):
    print("No")
  else:
    print("Yes")
else:
  print("No")
a, b = map(int,input().split())
c = (a,b)
if c == ((c**.5)**2):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

c=int(input().replace(" ",""))
print("Yes" if c==int(c**.5)**2 else "No")
#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin, maxint


def main():
    num = int(stdin.readline())

    M = []
    for _ in xrange(num):
        M.append([int(s) for s in stdin.readline().split()])

    g = set(xrange(1, num+1))
    index = g.pop()
    h = {index}
    weight = 0

    while g:_
        minimum = maxint
        for j in h:
            mj = M[j-1]
            for i in g:
                if 0 <= mj[i-1] < minimum:
                    index = i
                    minimum = mj[i-1]
        h.add(index)
        g.remove(index)
        weight += minimum

    print(weight)


main()

### FIXED CODE ###

#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin, maxint


def main():
    num = int(stdin.readline())

    M = []
    for _ in xrange(num):
        M.append([int(s) for s in stdin.readline().split()])

    g = set(xrange(1, num+1))
    index = g.pop()
    h = {index}
    weight = 0

    while g:
        minimum = maxint
        for j in h:
            mj = M[j-1]
            for i in g:
                if 0 <= mj[i-1] < minimum:
                    index = i
                    minimum = mj[i-1]
        h.add(index)
        g.remove(index)
        weight += minimum

    print(weight)


main()
import numpy as np
def python_list_sub(in1, in2):
    wrk = np.array(in1) - np.array(in2)
    return wrk.tolist()


n, k, q = map(int,input().split())
#A = []
Po = []
De = [1 for i in range(n)]

A = [int(input()) for i in range(q)]
#print(A)

for i in range(n):
    Po.append(int(k))
print(Po)
# 入力はOK

#計算
for i in range(q):
    #De = [1 for i in range(n)]
    ans = python_list_sub(Po, De)
print(ans)

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






### FIXED CODE ###

import numpy as np
def python_list_sub(in1, in2):
    wrk = np.array(in1) + np.array(in2)
    return wrk.tolist()


n, k, q = map(int,input().split())
#A = []
Po = []
De = [1 for i in range(n)]

A = [int(input()) for i in range(q)]
#print(A)

# はじめからポイント減らしておく
for i in range(n):
    Po.append(int(k-q))
#print(Po)
# 入力はOK

#計算
for j in A:
    #print(j,A[j])
    Po[j-1] += 1
#print(Po)

for i in range(n):
    if Po[i] >0:
        print('Yes')
    else: print('No')
w = int(raw_input())$
  2 n = int(raw_input())$
  3 a = []$
  4 for i in range(n):$
  5  a.append(map(int, raw_input().split(',')))$
  6 r = range(1,w + 1)$
  7 for i in a:$
  8  tmp = r[i[0] - 1]$
  9  r[i[0] - 1] = r[i[1] - 1]$
 10  r[i[1] - 1] = tmp$
 11 for i in r:$
 12  print i$

### FIXED CODE ###

w = int(raw_input())
n = int(raw_input())
a = []
for i in range(n):
  a.append(map(int, raw_input().split(',')))
r = range(1,w + 1)
for i in a:
  tmp = r[i[0] - 1]
  r[i[0] - 1] = r[i[1] - 1]
  r[i[1] - 1] = tmp
for i in r:
  print i
a,b = map(int,input().split())
ptint(max(a+a-1,a+b,b+b)

### FIXED CODE ###

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

light=1

for i in range(n):
    light=a[light]
    if light == 2:
        print(i)
        break
else:
    print(-1)

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
    a.append(int(input())-1)
 
light=0
 
for i in range(1,n+1):
    light=a[light]
    if light == 1:
        print(i)
        break
else:
    print(-1)
import math

while(1):
    thv = float(raw_input())
    for i in range(1, 20):
        y = 5 * (i-1)
        t = math.sqrt(y/4.9)
        v = 9.8 * t
        if v >= thv:
            print i
            break
            

### FIXED CODE ###

import math

while(1):
    try:
        thv = float(raw_input())
    except:
        break
    for i in range(1, 1000):
        y = 5 * (i-1)
        t = math.sqrt(y/4.9)
        v = 9.8 * t
        if v >= thv:
            print i
            break
n, k = map(int, input().split())
h = input().split()
if (k >= len(h)):
    h.clear()
else:
    for i in range(k):
        m = max(h)
        h.remove(m)
b = 0
sum(h)
print(b)

### FIXED CODE ###

a, b = map(int, input().split())
c = a//b
if (a%b == 0):
    d = c
else :
    d = c+1
print(d)