OpenKattis
Kattis Set 05

#### Start

2019-02-11 13:00 UTC

## Kattis Set 05

#### End

2019-02-18 09:29 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -352 days 7:05:48

164:29:59

0:00:00

# Problem ISelling Spatulas

Photo by Evan-Amos

You have finally realized your life-long dream: you opened your own chain of retail stores specializing in hard-to-find spatulas. Being your own boss is great – but you have to make all the decisions, like when your stores should be open. Being somewhat methodical, you decided to spend the first several days with the stores open all day and all night to see when the most profitable times are at each store. As a result, you have a lot of data on when people like to buy spatulas. In fact, you have recorded each sale and its timestamp. Now you have to analyze the data.

## Output

For each store, print the maximum profit (as a real number with two digits past the decimal point), followed by the beginning and ending minutes when the profit is realized. If two different periods both have the maximum profit, then choose the shortest one, and if there are still ties, choose the period that starts earliest. If the store never can turn a profit, print no profit. Stores must open and close on minute boundaries.

Sample Input 1 Sample Output 1
5
15 0.37
36 3.51
65 3.72
72 1.89
120 0.20
6
28 0.38
140 4.90
313 2.77
400 4.32
446 2.54
485 1.97
2
1 0.08
2 0.03
0

6.16 36 72
4.82 140 140
no profit