All submissions for this problem are available.
Arigato Industries manufactures Model A cars at its three plants in Kuton, Sipon and Tekkon. Its market primarily lies in Hokkaido, Miyagi, Izanagi, Mokuton and Osaka. Per unit cost in transporting a car from manufacturing destination to Sales Destination is given :
Note: No path exists from Tekkon to Osaka.
Your Objective is to minimize transportation costs after meeting demands at all locations.Assume total production at all plants is equal to the total demand
First line of the input contains the number of test cases T (1<=T<=100). Next three lines contain supply at Kuton, Sipon and Tekkon respectively. Next five lines contain demand at Hokkaido, Miyagi, Izanagi, Mokuton and Osaka
Output contains T lines. Each line denotes the minimum cost incurred in the respective test case.
Input: 1 10 15 16 5 7 8 6 15 Output: 689
First line of input indicates that there is only one test case. Next three lines indicate that the supply at Kuton, Sipon and Tekkon are 10, 15 and 16 respectively. Next five lines indicate that the demand at Hokkaido, Miyagi, Izanagi, Mokuton and Osaka are 5, 7, 8, 6 and 15 respectively.
The output 689 is the minimum cost that will be incurred in meeting the demands in the five cities.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.5, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.