• <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国产精品亚洲| 亚洲精品tv久久久久| 色成年激情久久综合| 久久精品国产欧美日韩| 久久久无码精品亚洲日韩京东传媒 | 7777精品伊人久久久大香线蕉 | 99久久超碰中文字幕伊人| 久久久久香蕉视频| www久久久天天com| 亚洲精品第一综合99久久| 久久福利青草精品资源站免费| 久久中文字幕人妻丝袜| 久久精品成人免费观看97| 久久久久女人精品毛片| 性做久久久久久久久浪潮| 久久精品18| 久久播电影网| 国产真实乱对白精彩久久| 狠狠色丁香久久婷婷综合五月| 伊人久久亚洲综合影院| 日韩欧美亚洲国产精品字幕久久久| 久久久91精品国产一区二区三区 | 久久精品国产色蜜蜜麻豆 | 久久久一本精品99久久精品88| 色天使久久综合网天天| 久久久久国产日韩精品网站| 97久久精品国产精品青草| 99久久超碰中文字幕伊人| 99久久99这里只有免费的精品| 久久99国内精品自在现线| 久久精品a亚洲国产v高清不卡| 亚洲精品乱码久久久久久蜜桃不卡 | 亚洲精品乱码久久久久久久久久久久| 久久综合视频网站| 伊人色综合九久久天天蜜桃| 久久乐国产精品亚洲综合| 亚洲精品成人久久久| 久久精品中文无码资源站| 久久亚洲中文字幕精品有坂深雪| 久久精品午夜一区二区福利| 国产精品久久久久9999高清|