#t514. 最小花费
最小花费
Bank Transfer Fees
Special for beginners, ^_^
Problem Description
Among people, some pairs of people can transfer money between their bank accounts. The transfer fee differs from pair to pair. Given the percentage fee that must be deducted from the transferred amount for each transfer, find the minimum amount of money that needs to send so that receives yuan after the transfer.
Input Format
The first line contains two positive integers , the total number of people and the number of pairs that can transfer to each other.
The next lines each contain three positive integers , meaning a transfer between person and person deducts a fee ().
The last line contains two positive integers . The data guarantees that and can transfer money directly or indirectly.
Output Format
The minimum total amount must send so that receives yuan. Accurate to decimal places.
Sample Input 1
3 3
1 2 1
2 3 2
1 3 3
1 3
Sample Output 1
103.07153164
Constraints
1s, 1024KiB for each test case.