2015 ACM/ICPC Asia Regional Shanghai Online

Explore Track of Point

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)

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, is like rose, is a Cardioid, and so on. Today, there is a simple problem about it which you need to solve.Give you a triangleand AB = AC. M is the midpoint of BC. Point P is inand makes m maximum. The track of P is. Would you mind calculating the length of?Given the coordinate of A, B, C, please output the length of.

Input

There are T () 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 exceedby 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 ofwith exactly 4 digits after the decimal point.

Sample Input

10 1 -1 0 1 0

Sample Output

Case #1: 3.2214

Source

/*********************************************************************/

给出等腰三角形ABC,AB=AC,M为BC中点。P点为三角形内使min{∠MPB+∠APC,∠MPC+∠APB} 最大的点。求P点轨迹。则容易找到中线AM上的P点都满足使得∠MPB=∠MPC,∠APC=∠APB,则∠MPB+∠APC=∠MPC+∠APB=180°故轨迹包含中线AM。并且所有满足的P点都应满足:∠MPB+∠APC=∠MPC+∠APB=180°

任取中线上的一点P,可找到与之对应的一点Q,使得∠MQB=∠MPB,且∠AQC=∠APC,则∠MQB+∠AQC=180°成立,故Q点形成另一条子轨迹。Q点的作法:

ΔBPM与ΔAPC的外接圆的交点。另一个交点即为P点。(由此可证明没有其他多余的轨迹)圆弧BM、AC分别对应圆上的∠MQB=∠MPB,且∠AQC=∠APC。

P与Q重合时,两者在ΔABC的内心上。

证明:P与Q重合,即ΔBPM与ΔAPC的外接圆相切。作切线PD,则:∠DPM=∠APE=∠ACP(对顶角相等,弦切角相等)……[1]又∠AMB=∠BPD=90°则∠CPM=∠BPM=∠PDB(左右对称,余角相等)则∠PCM=∠DPM(余角相等,对顶角相等)……[2]由[1][2]得到∠ACP=∠PCM即PC是角平分线,又AP也为角平分线,故此时的P点为ΔABC的内心I。

猜测Q的轨迹是个圆弧已证明这一点是猜的,还没证明。但可以尝试证明∠BQC是个常量入手,得到Q的轨迹是个圆弧。猜的依据是:轨迹关于AM左右对称,且经过ΔABC的内心时为最高点。

圆弧为ΔBCI的外接圆的一部分前面已经证明了Q的轨迹过ΔABC的内心I。由对称得圆心在AM的延长线上,现在直接求该圆心的位置即可。

计算过程:由三点坐标得到AB的距离为b,BC的距离为2a,AM即高为h,则内接圆的半径r=2ah/C=2ah/(2a+2b)=ah/(a+b)ΔBCI的外接圆半径为R,且设M到圆心距离为x,,R=r+x圆弧BIC张角为2β=2arcsin(a/R)圆弧BIC长为2Rβ

附code:

#include <cstdio>#include <iostream>#include <cstring>#include <queue>#include <algorithm>#include <cmath>using namespace std;struct node{double x, y;}A, B, C, M;double dis(node a, node b){return sqrt(pow(a.x-b.x, 2)+pow(a.y-b.y, 2));}int main(){int T, o = 0;scanf("%d", &T);while(T–){scanf("%lf%lf%lf%lf%lf%lf", &A.x, &A.y, &B.x, &B.y, &C.x, &C.y);M.x = (B.x+C.x)/2, M.y = (B.y+C.y)/2;double a = dis(B, C)/2, b = dis(A, B), h = dis(A,M);double r = a*h/(a+b);double R = (a*a-r*r)/r/2+r;double ans = 2*R*asin(a/R);//printf("%f %f %f %f %f %f\n", a, b, h, r, R, ans);ans += h;printf("Case #%d: %.4f\n", ++o, ans);}return 0;}补充证明

重新描述一遍题

在圆O外一点作切线AB、AC,M为BC中点,连AM交圆O于P、F。在劣弧BC上取一点Q,连AG延长交圆O于D。求证:P为ΔABC的内心,∠BQM+∠AQC=180°证明:你可以先了解一点关于调和点列和调和线束的知识。因为APMF为调和点列,所以CA、CP、CB、CF为调和线束。CP垂直于CF,则CP平分∠ACB。又AP平分∠BAC,则P为ΔABC的内心。

因为APMF为调和点列,所以DA、DP、DM、DF为调和线束。DP垂直于DF,则DP平分∠ADM。∠ADP=∠MDP.又∠CDP=∠BDP,则∠CDQ=∠BDM又∠CQD=∠CBQ,则∠BDM=∠CBQ……[3]

因为CA、CP、CB、CF为调和线束,所以AQED为调和点列,所以MA、MQ、ME、MD为调和线束。MA垂直于MC,,则MC平分∠QMD。则∠QMC=∠DMC,又由[3],则∠BQM=∠MBD=∠CQD

则∠BQM+∠AQC=∠CQD+∠AQC=180°

证毕#

菜鸟成长记

仿佛松树就是一位威风的将军,守护着国家的国民。

2015 ACM/ICPC Asia Regional Shanghai Online

相关文章:

你感兴趣的文章:

标签云: