시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB32266.667%

문제

The label of a supermarket product describes the composition of its ingredients as follows:

Ingredients: Chocolate ($41.1\%$), Sugar, Peanuts ($20\%$), Starch, Thickener, Glaze.

In accordance with regulations from the Bureau for the Analysis of Product Composition, the ingredients are listed in descending order by percentage, and the percentages add up to $100\%$. While some ingredients have their percentage specified on the label, others do not.

For each unspecified ingredient, determine the minimum and maximum possible percentage, given these conditions.

입력

The input consists of:

  • One line with an integer $n$ ($1\leq n\leq 100$), the number of ingredients on the label.
  • $n$ lines, each starting with a string $w$ ($1\leq |w|\leq 20$), the name of the ingredient, optionally followed by a single number $p$ ($0< p \leq 100$), the specified percentage of the ingredient.

The ingredient names are unique and only consist of English lowercase letters (a-z). Percentages are given with at most one digit after the decimal point. There is at least one ingredient whose percentage is not specified. The input describes a valid label.

출력

Output the unspecified ingredients in the order given in the input. For each such ingredient, output its name, followed by its minimum and maximum percentages.

Your answer should have an absolute or relative error of at most $10^{-6}$.

예제 입력 1

6
chocolate 41.1
sugar
peanuts 20
starch
thickener
glaze

예제 출력 1

sugar 20 38.9
starch 0 18.9
thickener 0 9.45
glaze 0 6.3

예제 입력 2

1
water

예제 출력 2

water 100 100

예제 입력 3

4
flour
milk
egg
salt

예제 출력 3

flour 25 100
milk 0 50
egg 0 33.33333333
salt 0 25