HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > C. T. 2011 > problem:


Triangle2

Guest
• Discussion of problem (1)

Volume problems

• Coins and nests
• Ball
• Huge parking
• Islands areas
• Progression
• Passing score
• Jedi vs Sith
• Ñîðòèðîâêà âðåìåíè
• Triangle2

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/2000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

You are given a triangle and number S. Find 3 points on sides of given triangle so that its area equals to S.

Input

On the first line there are 6 integer values x1, y1, x2, y2, x3, y3 – coordinates of triangle, their absolute value <=1000. On the second line integer value of S, 0<=S<=109.

Output

If there isn’t any 3 points on the sides of triangle then write “No solution”. Otherwise write coordinates of found 3 points. Area of found triangle must not differ more than 10-7 from S.

Example

stdin stdout

0 0 7 0 0 7
6

3.0 0.0
3.0 4.0
0.0 4.0

0 0 3 0 0 4
7

No solution

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru