• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            #include <stdio.h>
            #include 
            <math.h>
            #include 
            <stdlib.h>

            struct Point
            {
                
            double x, y;
            };

            bool line( Point a, Point b, Point c )
            {
                
            return ( b.x- a.x )* ( c.y- b.y )== ( b.y- a.y )* ( c.x- b.x );
            }

            bool none( Point a, Point b, Point c, Point d )
            {
                
            return ( b.x- a.x )* ( d.y- c.y )== ( b.y- a.y )* ( d.x- c.x );
            }

            Point intersection( Point u1, Point u2, Point v1, Point v2 )
            {
                Point ret
            = u1;
                
                
            double t= ( ( u1.x- v1.x)* ( v1.y- v2.y )- ( u1.y- v1.y) * ( v1.x- v2.x ) )
                          
            / ( ( u1.x- u2.x )* ( v1.y- v2.y )- ( u1.y- u2.y)* ( v1.x- v2.x) );
                          
                ret.x
            += ( u2.x- u1.x )* t;
                ret.y
            += ( u2.y- u1.y )* t;
                
                
            return ret;
            }

            int main()
            {
                
            int test;
                scanf(
            "%d",&test);
                
                puts(
            "INTERSECTING LINES OUTPUT");
                
            while( test-- )
                {
                    Point a, b, c, d;
                    scanf(
            "%lf %lf %lf %lf %lf %lf %lf %lf"&a.x,&a.y,&b.x,&b.y,
                           
            &c.x,&c.y,&d.x,&d.y );
                           
                    
            if( line( a, b, c ) && line( a, b, d ) ) puts("LINE");
                    
            else if( none( a, b, c, d ) ) puts("NONE");
                    
            else
                    {
                        Point t
            = intersection( a, b, c, d );
                        printf(
            "POINT %.2lf %.2lf\n", t.x, t.y );
                    }
                }
                puts(
            "END OF OUTPUT");
                
                
            return 0;
            }
            posted on 2008-12-07 13:38 Darren 閱讀(154) 評論(0)  編輯 收藏 引用
            久久综合一区二区无码| 久久精品成人一区二区三区| 亚洲综合伊人久久大杳蕉| 久久亚洲精品成人av无码网站| 久久国产免费观看精品3| 九九久久精品无码专区| 国产亚洲精品久久久久秋霞| 国产精品美女久久久久AV福利| 性做久久久久久久久浪潮| 激情伊人五月天久久综合| 亚洲国产成人精品女人久久久 | 久久人人爽人人爽人人片AV东京热| 欧美成a人片免费看久久| MM131亚洲国产美女久久| 合区精品久久久中文字幕一区 | 久久综合精品国产二区无码| 久久人人爽人人爽人人片AV麻豆| 国产精品一区二区久久不卡| 亚洲性久久久影院| 久久WWW免费人成—看片| 色噜噜狠狠先锋影音久久| 久久成人国产精品免费软件| 无码任你躁久久久久久| 久久青青草原精品国产软件 | 精品久久久久久久久久中文字幕| 97久久综合精品久久久综合| 狠狠色综合网站久久久久久久高清 | 久久精品国产亚洲AV不卡| 国产99久久九九精品无码| 精品久久久久中文字幕日本| 亚洲va久久久噜噜噜久久男同| 亚洲精品国精品久久99热 | 人妻无码久久一区二区三区免费| 亚洲精品tv久久久久| 国内精品久久久久影院老司| 亚洲精品乱码久久久久久蜜桃| 日本加勒比久久精品| 中文成人无码精品久久久不卡| 欧美精品丝袜久久久中文字幕| 久久免费高清视频| 久久精品亚洲精品国产欧美|