• <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>
            很簡單的幾何題。直接硬搞即可。


            /************************************************************************* 
            Author: WHU_GCC 
            Created Time: 2007-9-13 17:09:58 
            File Name: a.cpp 
            Description:  
            ***********************************************************************
            */
             
            #include 
            <iostream> 
            #include 
            <cmath> 
            using namespace std; 
            #define out(x) (cout<<#x<<": "<<x<<endl) 
            const int maxint=0x7FFFFFFF
            typedef 
            long long int64; 
            const int64 maxint64 = 0x7FFFFFFFFFFFFFFFLL; 
            template
            <class T>void show(T a, int n){for(int i=0; i<n; ++i) cout<<a[i]<<' '; cout<<endl;} 
            template
            <class T>void show(T a, int r, int l){for(int i=0; i<r; ++i)show(a[i],l);cout<<endl;} 

            const int maxn = 600
            const int maxm = 60

            typedef 
            struct point_t 

                
            double x, y, z; 
            }


            double dot(const point_t &a, const point_t &b) 

                
            return a.x * b.x + a.y * b.y + a.z * b.z; 
            }
             

            double len2(const point_t &a) 

                
            return a.x * a.x + a.y * a.y + a.z * a.z; 
            }
             

            double angle(const point_t &a, const point_t &b) 

                
            return abs(acos(dot(a, b) / sqrt(len2(a) * len2(b)))); 
            }
             

            int n, m; 
            point_t p[maxn]; 
            point_t t[maxm]; 
            double w[maxm]; 
            int visible[maxn]; 

            int main() 

                
            while (scanf("%d"&n), n != 0
                

                    
            for (int i = 0; i < n; i++
                        scanf(
            "%lf%lf%lf"&p[i].x, &p[i].y, &p[i].z); 
                    scanf(
            "%d"&m); 
                    
            for (int i = 0; i < m; i++
                        scanf(
            "%lf%lf%lf%lf"&t[i].x, &t[i].y, &t[i].z, &w[i]); 
                     
                    memset(visible, 
            0sizeof(visible)); 
                    
            for (int i = 0; i < n; i++
                        
            for (int j = 0; j < m; j++
                            
            if (angle(p[i], t[j]) < w[j]) 
                                visible[i] 
            = 1
                     
                    
            int cnt = 0
                    
            for (int i = 0; i < n; i++
                        
            if (visible[i]) cnt++
                    printf(
            "%d\n", cnt); 
                }
             
                
            return 0
            }
             
            posted on 2007-09-15 20:25 Felicia 閱讀(396) 評論(0)  編輯 收藏 引用 所屬分類: 計算幾何
             
            亚洲午夜精品久久久久久浪潮 | 伊人久久大香线蕉影院95| 蜜臀av性久久久久蜜臀aⅴ | 久久精品亚洲欧美日韩久久| 久久国产精品波多野结衣AV | 久久99热国产这有精品| 26uuu久久五月天| 久久亚洲AV无码精品色午夜| 婷婷久久久亚洲欧洲日产国码AV| 伊人色综合久久天天人手人婷 | 色综合久久无码中文字幕| 大美女久久久久久j久久| 国产精品久久久久jk制服| 久久久噜噜噜久久| 99久久无码一区人妻| 欧美亚洲色综久久精品国产| 亚洲婷婷国产精品电影人久久| 久久精品草草草| 韩国无遮挡三级久久| 亚洲天堂久久精品| 成人国内精品久久久久一区| 伊人情人综合成人久久网小说| 国产成人无码久久久精品一| 久久久久久久久久久久中文字幕| 久久国产精品无码网站| 久久国产欧美日韩精品| 无码精品久久久天天影视 | 亚洲国产高清精品线久久| 久久久久久极精品久久久 | 亚洲级αV无码毛片久久精品| 狠狠色丁香婷婷久久综合五月| 亚洲精品久久久www| 麻豆精品久久久久久久99蜜桃 | 一本大道久久香蕉成人网| 久久妇女高潮几次MBA| 91精品国产高清久久久久久91| 久久性精品| 久久婷婷五月综合97色直播| 精品久久久中文字幕人妻| 久久精品亚洲精品国产欧美| 午夜天堂精品久久久久|