• <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)  編輯 收藏 引用
            久久综合久久久| 伊人久久精品影院| 久久精品国产99久久久| 久久久久久综合网天天| 久久亚洲AV成人无码国产| 四虎国产永久免费久久| 欧美激情一区二区久久久| 一级女性全黄久久生活片免费| 精品久久人人爽天天玩人人妻| 久久久久久人妻无码| 久久影院亚洲一区| 久久久久久亚洲精品成人| 欧美激情精品久久久久久久| 97久久久精品综合88久久| 国产综合免费精品久久久| 亚洲国产精品无码久久久不卡 | 久久亚洲AV无码西西人体| 亚洲AV日韩AV永久无码久久| 久久国产精品无码网站| 成人妇女免费播放久久久| 国产亚洲美女精品久久久2020| 国产99久久九九精品无码| 色偷偷88888欧美精品久久久| 日本欧美国产精品第一页久久| 久久99精品国产一区二区三区| 久久久久久久波多野结衣高潮 | 久久强奷乱码老熟女网站| 国产高清美女一级a毛片久久w | 久久一区二区三区免费| 伊人久久大香线蕉影院95| 久久久久久夜精品精品免费啦| 久久久亚洲裙底偷窥综合| 香蕉aa三级久久毛片 | 久久SE精品一区二区| 要久久爱在线免费观看| 久久夜色精品国产| 狠狠久久综合伊人不卡| 国产成人无码精品久久久免费| 久久九九有精品国产23百花影院| 久久综合狠狠综合久久综合88| 精品人妻伦九区久久AAA片69|