Crushing blow

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

Khodislav is playing D&D. At the moment, his character is fighting a monster and Khodislav, who is for some reason very sure in his attack, wants to destroy the enemy with the last crushing blow. His character has different weapons; the damage these weapons can cause is defined by rolling dice and characterized by three numbers nn, ff, and mm, where nn is the number of dice, ff is the number of faces on each die, and mm is a modifier. For instance, if n=3n = 3, f=8f = 8, m=5m = 5, then you will need to roll three eight-faced dice, sum the results, and add five to the sum to define the damage; this is usually written as 3d8+53d8 + 5.

To destroy the monster, a weapon must inflict damage of DD or greater. Help Khodislav to choose a weapon for his character that will help him to kill the monster with maximum probability.

Dice rolls are independent; it is equally likely to roll each of the faces on a die. There are all numbers from 11 to ff written on the faces of the die.

입력

In the first line of the input file, there is a single integer TT --- the number of tests (1T5,0001 \le T \le 5\\,000). It is followed by the description of TT tests.

The first line of a test contains two integers: WW --- the number of character's weapons and DD --- the minimum required damage to the monster (1W5,0001 \le W \le 5\\,000, 1D2501 \le D \le 250).

The following WW lines describe the weapons. Each line contains three integers: nn --- the number of the dice, ff --- the number of faces on each die, and mm --- the modifier (1n101 \le n \le 10, 2f202 \le f \le 20, 10m10-10 \le m \le 10).

It is guaranteed that the total number of weapons in all tests is not greater than 5,0005\\,000.

출력

For each test, print a single real number on a separate line --- the maximum probability of inflicting damage no less than DD with a single blow. The absolute error of the answers must not exceed 101110^{-11}.