F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Unstable

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 787    Accepted Submission(s): 170
Special Judge


Problem Description
Rasen had lost in labyrinth for 20 years. In a normal day, he found a bright screen. There were 4 points labeled by ¡®A¡¯ , ¡®B¡¯ , ¡®C¡¯ , ¡®D¡¯, and rasen could drag these point. And two points ¡®E¡¯ , ¡®F¡¯ moved. Rasen found that ¡®E¡¯ is the middle point of ¡®A¡¯ and ¡®B¡¯, and ¡®F¡¯ is the middle point of ¡®C¡¯ and ¡®D¡¯. Near the screen there was a marble slab.There were a list of the distance of AB , BC , CD , DA and EF. Rasen also found that the distance of these edge of the points in screen showed at the same time he drop the points. He wanted to know what will happen if the distances in screen are same with the number in slab.
 

Input
The first line of input contains only one integer T(<=50000), the number of test cases.
Each case contains five float number, indicating the distance of AB , BC , CD , DA , EF.£¨0<=distance<=10000£©
 

Output
For each test, first print a line ¡°Case #i:¡±(without quotes),with i implying the case number, then output the coordinates of A,B,C,D four points. Answer will be considered as correct if the length got from your output (the spj will use double to get the point, and the distance from two points will calculate in the way of sqrt((x1-x2)^2 +(y1-y2)^2) ) and the length given is less than 10-4.
(It guarantees that there exists a solution. If there are many solutions, output any one of them.)
 

Sample Input
1 1.000000 1.000000 1.000000 1.000000 1.000000
 

Sample Output
Case #1: 0.000000 0.000000 1.000000 0.000000 1.000000 1.000000 0.000000 1.000000
 

Author
FZUACM
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 15:54:13, Gzip enabled