#icpc2015autumnj. [icpc2015autumn_j]Longest Shortest Path

[icpc2015autumn_j]Longest Shortest Path

MathJax.Hub.Config({ tex2jax: { inlineMath: [["","",""], ["\\(","\\)"]], processEscapes: true }}); blockquote { font-family: Menlo, Monaco, "Courier New", monospace; color: #333333; display: block; padding: 8.5px; margin: 0 0 9px; font-size: 12px; line-height: 18px; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; white-space: pre; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; }

Problem Statement

You are given a directed graph and two nodes ss and tt. The given graph may contain multiple edges between the same node pair but not self loops. Each edge ee has its initial length d_ed\_e and the cost c_ec\_e. You can extend an edge by paying a cost. Formally, it costs xcdotc_ex \\cdot c\_e to change the length of an edge ee from d_ed\_e to d_e+xd\_e + x. (Note that xx can be a non-integer.) Edges cannot be shortened.

Your task is to maximize the length of the shortest path from node ss to node tt by lengthening some edges within cost PP. You can assume that there is at least one path from ss to tt.


Input

The input consists of a single test case formatted as follows.

NN MM PP ss tt
v_1v\_1 u_1u\_1 d_1d\_1 c_1c\_1
...
v_Mv\_M u_Mu\_M d_Md\_M c_Mc\_M

The first line contains five integers NN, MM, PP, ss, and tt: NN (2leqNleq2002 \\leq N \\leq 200) and MM (1leqMleq2,000 1\\leq M \\leq 2{,}000) are the number of the nodes and the edges of the given graph respectively, PP (0leqPleq106)0 \\leq P \\leq 10^6) is the cost limit that you can pay, and ss and tt (1leqs,tleqN1 \\leq s, t \\leq N, sneqts \\neq t) are the start and the end node of objective path respectively. Each of the following MM lines contains four integers v_iv\_i, u_iu\_i, d_id\_i, and c_ic\_i, which mean there is an edge from v_iv\_i to u_iu\_i (1leqv_i,u_ileqN1 \\leq v\_i, u\_i \\leq N, v_inequ_iv\_i \\neq u\_i) with the initial length d_id\_i (1leqd_ileq101 \\leq d\_i \\leq 10) and the cost c_ic\_i (1leqc_ileq101 \\leq c\_i \\leq 10).

Output

Output the maximum length of the shortest path from node ss to node tt by lengthening some edges within cost PP. The output can contain an absolute or a relative error no more than 10610^{-6}.



Sample Input 1

3 2 3 1 3
1 2 2 1
2 3 1 2```

### Output for the Sample Input 1

```plain
6.0000000```

* * *

### Sample Input 2

```plain
3 3 2 1 3
1 2 1 1 
2 3 1 1
1 3 1 1```

### Output for the Sample Input 2

```plain
2.5000000```

* * *

### Sample Input 3

```plain
3 4 5 1 3
1 2 1 2
2 3 1 1
1 3 3 2
1 3 4 1```

### Output for the Sample Input 3

```plain
4.2500000```

* * *