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

Explore Track of Point

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 833    Accepted Submission(s): 367


Problem Description
In Geometry, the problem of track is very interesting. Because in some cases, the track of point may be beautiful curve. For example, in polar Coordinate system, $\rho = \cos 3\theta$ is like rose, $\rho = 1 - \sin \theta$ is a Cardioid, and so on. Today, there is a simple problem about it which you need to solve.

Give you a triangle $\Delta ABC$ and AB = AC. M is the midpoint of BC. Point P is in $\Delta ABC$ and makes $min\{\angle MPB + \angle APC, \angle MPC + \angle APB\}$ maximum. The track of P is $\Gamma$. Would you mind calculating the length of $\Gamma$?

Given the coordinate of A, B, C, please output the length of $\Gamma$.
 

Input
There are T ($1 \leq T \leq 10^4$) test cases. For each case, one line includes six integers the coordinate of A, B, C in order. It is guaranteed that AB = AC and three points are not collinear. All coordinates do not exceed $10^4$ by absolute value.
 

Output
For each case, first please output "Case #k: ", k is the number of test case. See sample output for more detail. Then, please output the length of $\Gamma$ with exactly 4 digits after the decimal point.
 

Sample Input
1 0 1 -1 0 1 0
 

Sample Output
Case #1: 3.2214
 

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-04-25 10:09:53, Gzip enabled