Task DescriptionDiscussion (0)
Task :: jagode
After long-term cooperation in the plantation Jagode, farmers Šomi, Dragance and Ðurica had an argumenti, and they wished to divide plantations. BEcause Wisconsin (country from which are our farmers) that is known by a marshy land farmers are creating plantations in the form of squares. To save paperwork they decided to divide the land in lines that go from north to south, so that everyone gets some of the plantation (and some other parts). Their neighbor Zlatevic took plan in hand, and said that the problem could be easily solved. However, in the meantime farmer Zlatevic got lost in the forest chasing a gold frog. So, you have to help farmers to solve your problem.

Input data is read from the standard input. The first line of standard input is an integer N (1 <= N <= 200), which represents the total number of plantation that have Šomi, Dragance and Ðurica. In each of the following lines there are three real numbers X, Y, and A, (0 <= X, Y, A <= 30000). X, Y coordinates represent the beginning of plantations on the map (South-West corner or the lower left corner of plantations), and A represents the side length of a plantation.

To the standard output, should be printed it two lines two real numbers, with the accuracy of two decimals (ie, with two digits after the decimal point). They represent the X coordinates of the imaginary lines that divided the land.


1 1 100
200 200 100


Explanation. In the example of one of the farmers will lapse two-thirds of the square (plantations), the second one third of the first and one third second, and finally the third will lapse two-thirds of the other squares. Solutions will in each test sample to be unique.
Submit Solution
Available Languages
Task info
Time:0.5 sec.
Memory:1 MB
AddedBy: admin
Task Ratings

3.9 (23 votes)

3.6 (18 votes)
Acceptance Rate
Recent Submissions
Fastest Solutions
petko 0.001 s.
smiljko 0.001 s.
Zeka_Dusman_1 0.001 s.
troka 0.002 s.
halil 0.002 s.
Krivi_Srki 0.002 s.
nalism 0.003 s.
dzingis 0.003 s.
nikola 0.003 s.
D.Ostojic 0.003 s.
Solved By