#T290. 最小花费
最小花费
Description
Among n people, certain pairs of bank accounts can transfer money to each other. The transaction fees for transfers between these people vary. Given the percentage of the transaction fee deducted from the transfer amount between these people, determine the minimum amount of money A needs to send so that B receives exactly 100 yuan after all fees.
Input Format
The first line contains two positive integers, n and m, representing the total number of people and the number of pairs who can transfer money to each other, respectively.
The following m lines each contain three positive integers, x, y, and z, indicating that a transfer between person x and person y incurs a fee of z% (z < 100).
The last line contains two positive integers, A and B. It is guaranteed that A and B can transfer money to each other directly or indirectly.
Output Format
Output the minimum total amount A needs to send so that B receives exactly 100 yuan. The result should be accurate to 8 decimal places.
3 3
1 2 1
2 3 2
1 3 3
1 3
103.07153164
Hint
【Data Size】 1 ≤ n ≤ 2000