### Блог пользователя pistone

Автор pistone19 месяцев назад, ,

there are 10000 stations numbered from 0 to 9999. from each station , some load has to be transferred to another station by train . the fuel consumption of train between 2 successive station is 1 litre .

Find the minimum amount of fuel , in which loads can be transferred to all the destination stations.

constraints: the load for each station is between 1 and 100 inclusive. a train cannot carry more than 50 kgs of load at one time. a train cannot carry loads of several stations at the same time even if it can take more load . several stations can send their load to a station at the same time.

the first train leaves station 0.

Input : the destination station and load to be transferred for each of the 10000 stations.

need help in solving this problem

•
• -5
•

 » 19 месяцев назад, # |   +11 Please provide link to the problem, in the opposite case you can be cheater.
•
 » » 19 месяцев назад, # ^ |   +1 hi , this was already asked in my company's internal programming contest. i couldnt solve it

 » 19 месяцев назад, # |   0