• <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)  編輯 收藏 引用
            噜噜噜色噜噜噜久久| 亚洲va久久久噜噜噜久久男同| 久久99精品国产麻豆宅宅| 精品久久久久久综合日本| 久久丝袜精品中文字幕| 色诱久久久久综合网ywww| 久久精品天天中文字幕人妻| 久久r热这里有精品视频| 久久天天躁狠狠躁夜夜2020| 99精品国产在热久久无毒不卡 | 国产精品99久久久久久www| 久久se精品一区二区影院| 久久久久青草线蕉综合超碰| 91精品久久久久久无码| 77777亚洲午夜久久多喷| 久久久91人妻无码精品蜜桃HD| 久久精品国产亚洲AV嫖农村妇女 | 久久精品麻豆日日躁夜夜躁| 久久播电影网| 精品久久777| 99久久精品影院老鸭窝| 久久久久亚洲av无码专区导航| 久久亚洲国产精品五月天婷| 一本大道加勒比久久综合| 午夜精品久久久久久99热| 国产欧美久久久精品影院| 久久精品亚洲欧美日韩久久| 2020最新久久久视精品爱| 天天久久狠狠色综合| 久久久国产精品网站| 国产精品久久久久影视不卡| 精品国产乱码久久久久久郑州公司| 亚洲中文久久精品无码ww16| 久久人人青草97香蕉| 亚洲国产精品无码久久青草| 色偷偷91久久综合噜噜噜噜| 亚洲欧洲中文日韩久久AV乱码| 久久男人AV资源网站| 久久强奷乱码老熟女| 2020国产成人久久精品| 亚洲乱码精品久久久久..|