NIO is a big boss. He will now dispatch his N employees to K cities. And he must send exactly ei employees to the i-th city.
NIO has no redundant employees which means,
The cost of sending the i-th employee to the j-th city is ci,j. NIO wants to know the minimum cost of the dispatch.
The first line contains two integers N(1≤N≤105) and K(1≤K≤10) --- the number of employees and the number of the cities.
The second line contains K integers ei(1≤ei≤n) --- the number of employees for i-th city.
The following N lines each contain K integers cij(0≤ci,j≤105) --- the cost of sending the i-th employee to the j-th city.
One integer represent the minimum cost.
5 2
1 4
1 1
4 3
4 5
2 1
3 2
11