http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2432

结论:
证明:


如图所示,作AG//BC交BE延长线于点G,作DH//AB交CF于点H
则有
所以AG:BC=AE:EC=1:2,
AP:PD=AG:BD=3:4
又由于DH:BF=1:3, DH:AF=1:6

所以DR:AR=1:6, DR:DA=1:7

look,7出来了(基本上到这里结论就出来了)
(更详细的证明见http://blog.csdn.net/freezhanacmore/article/details/8171942

/*0.016s*/

#include<cstdio>
#include<cmath>

int main()
{
    int t;
    double Ax, Ay, Bx, By, Cx, Cy, area;
    scanf("%d", &t);
    while (t--)
    {
        scanf("%lf%lf%lf%lf%lf%lf", &Ax, &Ay, &Bx, &By, &Cx, &Cy);
        area = (Ax * By + Bx * Cy + Cx * Ay - Ay * Bx - By * Cx - Cy * Ax) / 14;
        printf("%.f\n", fabs(area));
    }
    return 0;
}

Comments

comments powered by Disqus