#t514. 最小花费

最小花费

Bank Transfer Fees

Special for beginners, ^_^

Problem Description

Among nn 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 AA needs to send so that BB receives 100100 yuan after the transfer.

Input Format

The first line contains two positive integers n,mn,m, the total number of people and the number of pairs that can transfer to each other.

The next mm lines each contain three positive integers x,y,zx,y,z, meaning a transfer between person xx and person yy deducts a z%z\% fee (z<100z\lt100).

The last line contains two positive integers A,BA,B. The data guarantees that AA and BB can transfer money directly or indirectly.

Output Format

The minimum total amount AA must send so that BB receives 100100 yuan. Accurate to 88 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.