在n个人中,某些人的银行账号之间可以互相转账。这些人之间转账的手续费各不相同。给定这些人之间转账时需要从转账金额里扣除百分之几的手续费,请问A最少需要多少钱使得转账后B收到100元。
Among n
individuals, the bank accounts of some people can transfer money to each other.
The fees for transferring money between these people vary. Given that when
transferring money between these people, there is a percentage of the handling
fee that needs to be deducted from the transfer amount, what is the minimum
amount A needs to transfer in order for B to receive 100 yuan after the
transfer.
The first line
inputs two positive integers n and m, which represent the total number of
people and the pairs of people who can transfer money to each other. (0<n<=2000)
The following m
lines input three positive integers x, y, z, which means that the transfer
between the person labelled x and the person labelled y needs to deduct z% of
the handling fee (z<100).
The last line
inputs two positive integers A and B. The data is guaranteed so that transfer
directly or indirectly between A and B is possible.
Output the minimum
total amount required for person A to transfer person B 100 yuan. Accurate to 8
decimal places.
3 3
1 2 1
2 3 2
1 3 3
1 3
103.07153164