久久精品中文字幕第23页,无码任你躁久久久久久老妇,综合久久一区二区三区http://m.shnenglu.com/logics-space/category/9532.htmlmath & geometryzh-cnSat, 19 Sep 2009 04:13:13 GMTSat, 19 Sep 2009 04:13:13 GMT602187 Beauty Contesthttp://m.shnenglu.com/logics-space/articles/94940.htmllogics_spacelogics_spaceTue, 01 Sep 2009 00:48:00 GMThttp://m.shnenglu.com/logics-space/articles/94940.htmlhttp://m.shnenglu.com/logics-space/comments/94940.htmlhttp://m.shnenglu.com/logics-space/articles/94940.html#Feedback0http://m.shnenglu.com/logics-space/comments/commentRss/94940.htmlhttp://m.shnenglu.com/logics-space/services/trackbacks/94940.html 1 #include<iostream>
 2 #include<cmath>
 3 #include<vector>
 4 #include<algorithm>
 5 #include<cstdio>
 6 using namespace std;
 7 const int maxn  = 60000;
 8 
 9 struct Point {              // 二維點(diǎn)或矢量
10     int x, y;
11     Point() {}
12     Point(int x0, int y0): x(x0), y(y0) {}
13 };
14 
15 
16 struct Polygon{
17     Point p[maxn];
18     int n;
19 };
20 
21 //二維矢量運(yùn)算
22 bool operator==(Point p1, Point p2)
23 {
24     return ( p1.x - p2.x==0 &&  p1.y - p2.y==0);
25 }
26 bool operator!=(Point p1, Point p2)
27 {
28     return ( p1.x - p2.x != 0 ||  p1.y - p2.y != 0);
29 }
30 bool operator<(Point p1, Point p2)
31 {
32     return p1.x < p2.x || p1.x - p2.x==0 &&  p1.y < p2.y;
33 }
34 Point operator+(Point p1, Point p2)
35 {
36     return Point(p1.x + p2.x, p1.y + p2.y);
37 }
38 Point operator-(Point p1, Point p2)
39 {
40     return Point(p1.x - p2.x, p1.y - p2.y);
41 }
42 int operator*(Point p1, Point p2) // 計算叉乘 p1 × p2
43 {
44     return (p1.x * p2.y - p2.x * p1.y);
45 }
46 int operator&(Point p1, Point p2) { // 計算點(diǎn)積 p1·p2
47     return (p1.x * p2.x + p1.y * p2.y);
48 }
49 
50 
51 //Graham 凸包
52 
53 Polygon Convex_Hull( Point FP[], int fn)
54 {
55     int i, k;
56     Polygon res;
57     sort(FP, FP+fn );
58     res.n = 0;
59     for(i = 0; i < fn; ++i )
60     {
61         while(res.n>=2 &&  ( res.p[res.n-1- res.p[res.n-2] ) *( FP[i] - res.p[res.n-2] ) <= 0) res.n--;
62         res.p[res.n++= FP[i];
63     }
64     k = res.n;
65     for(i = fn-2; i>=0; i--)
66     {
67         while(res.n > k && ( res.p[res.n-1- res.p[res.n-2]) * ( FP[i] - res.p[res.n-2] ) <= 0 ) res.n--;
68         res.p[res.n++= FP[i];
69     }
70     res.n--;
71     return res;
72 }
73 
74 Polygon ans;
75 Point FP[maxn];
76 int FN;
77 
78 int main(){
79     int i, j;
80     int dis, best = -1;
81     scanf("%d",&FN);
82     for(i = 0; i < FN; i++)
83         scanf("%d%d",&FP[i].x , &FP[i].y);
84     ans = Convex_Hull( FP, FN);
85     for(i = 0; i < ans.n; i++)
86         for(j = 0; j < ans.n; j++)
87         {
88             dis = (ans.p[i].x - ans.p[j].x)*(ans.p[i].x - ans.p[j].x)+(ans.p[i].y - ans.p[j].y)*(ans.p[i].y - ans.p[j].y);
89             if(dis > best)best = dis;
90         }
91     printf("%d\n",best);
92 }

能使用整點(diǎn)函數(shù)的盡量使用整點(diǎn)函數(shù),避免精度問題



logics_space 2009-09-01 08:48 發(fā)表評論
]]>
pku 題目大意http://m.shnenglu.com/logics-space/articles/91160.htmllogics_spacelogics_spaceSat, 25 Jul 2009 12:10:00 GMThttp://m.shnenglu.com/logics-space/articles/91160.htmlhttp://m.shnenglu.com/logics-space/comments/91160.htmlhttp://m.shnenglu.com/logics-space/articles/91160.html#Feedback0http://m.shnenglu.com/logics-space/comments/commentRss/91160.htmlhttp://m.shnenglu.com/logics-space/services/trackbacks/91160.html

1031 fence

有一個封閉的籬笆(簡單多邊形),現(xiàn)有一光源(0,0),問他能照亮多少角度的籬笆?

1039  Pipe

有一根管道(折線型),管道不反光,現(xiàn)在管道的一端射入一束光,調(diào)整入射角度使得光射的最遠(yuǎn),求最遠(yuǎn)距離。

1066 Treasure Hunt

有一個正方形區(qū)間被隔板隔成若干個小房間。房間的墻的中點(diǎn)是門。現(xiàn)在有一個寶藏放在某個房間的某個位置,問人從區(qū)間外至少經(jīng)過幾道門能找到寶藏?

1106 Transmitters

有一個雷達(dá)的探測范圍是一個以雷達(dá)為圓心的半圓區(qū)間,目標(biāo)散落在雷達(dá)的周圍。轉(zhuǎn)動雷達(dá),使最多的目標(biāo)在探測范圍內(nèi)。求最多目標(biāo)數(shù)量?

1113 Wall

有一棟城堡(簡單多邊形)要建一個城墻圍住自己,要求

1城堡的每個點(diǎn)到城墻的距離至少為d

2城墻的長度必須最短

1118 Lining Up

平面上有一片點(diǎn)集(數(shù)量700),找一條直線使得它經(jīng)過的點(diǎn)最多。

1133   Stars

給你一個星空的描述(一系列點(diǎn)的坐標(biāo))。在給你幾個星系的描述。讓你在星空中找有沒有對應(yīng)的星系。給你的星系如果能按比例縮放,旋轉(zhuǎn)成星空的星系,則查找成功。

1151 Atlantis

給你幾個長方形(平行于x,y軸),求它們面積的交

1259 The Picnic

有一片點(diǎn)集,求一個最大空凸多邊形。

1265   Area

網(wǎng)格坐標(biāo)系上有一個簡單多邊形,求它的面積,邊上有多少格點(diǎn),內(nèi)部有多少格點(diǎn)。

1266  Cover an Arc.

有一段圓弧,已知圓弧的起點(diǎn),終點(diǎn)和中間一點(diǎn)。找一塊最小的長方形(該長方形的邊平行x,y軸)覆蓋他。

1279   Art Gallery

有一個畫廊(簡單多邊形),只有一個看守,該看守必須要找一個點(diǎn)使得他能看到畫廊所有的墻。找出滿足條件的點(diǎn)所構(gòu)成的區(qū)域

1375 Intervals

二維平面里,天花板上有盞燈,半空中有很多圓,問在地上的影子的情況。

 

1379 Run Away

平面里有一點(diǎn)集,在平面中找一個最大空圓。



logics_space 2009-07-25 20:10 發(fā)表評論
]]>
pku 1066 Treasure Hunthttp://m.shnenglu.com/logics-space/articles/91048.htmllogics_spacelogics_spaceFri, 24 Jul 2009 08:20:00 GMThttp://m.shnenglu.com/logics-space/articles/91048.htmlhttp://m.shnenglu.com/logics-space/comments/91048.htmlhttp://m.shnenglu.com/logics-space/articles/91048.html#Feedback5http://m.shnenglu.com/logics-space/comments/commentRss/91048.htmlhttp://m.shnenglu.com/logics-space/services/trackbacks/91048.html閱讀全文

logics_space 2009-07-24 16:20 發(fā)表評論
]]>
EXOCENTER OF A TRIANGLE 證明http://m.shnenglu.com/logics-space/articles/89814.htmllogics_spacelogics_spaceSat, 11 Jul 2009 12:58:00 GMThttp://m.shnenglu.com/logics-space/articles/89814.htmlhttp://m.shnenglu.com/logics-space/comments/89814.htmlhttp://m.shnenglu.com/logics-space/articles/89814.html#Feedback0http://m.shnenglu.com/logics-space/comments/commentRss/89814.htmlhttp://m.shnenglu.com/logics-space/services/trackbacks/89814.html
已知ABDE, BCHJ 和 ACFG 是正方形,L, M, N 分別是中點(diǎn),求證 o 是三角形ABC的垂心。





隊(duì)友lwc的證明就是證 三角形ABC 和 三角形BJQ 全等, 其中BM == MQ;


直接暴搞的代碼:
 1 #include<iostream>
 2 #include<cmath>
 3 #include<stdio.h>
 4 using namespace std;
 5 const double PI = 3.1415926535897932384626433832795;
 6 const double eps = 1e-8;
 7 int dcmp(double x){return x < -eps ? -1 : x > eps ;}
 8 
 9 double fix(double x){
10     if(dcmp(x)==0)return 0;
11     return x;
12 }
13 
14 struct Point {
15     double x, y;
16     Point() {}
17     Point(double x0, double y0): x(x0), y(y0) {}
18 };
19 
20 double operator*(Point p1, Point p2) // 計算叉乘 p1 × p2
21 {
22     return (p1.x * p2.y - p2.x * p1.y);
23 }
24 Point operator-(Point p1, Point p2)
25 {
26     return Point(p1.x - p2.x, p1.y - p2.y);
27 }
28 Point operator+(Point p1, Point p2)
29 {
30     return Point(p1.x + p2.x, p1.y + p2.y);
31 }
32 Point Rotate(Point p, double angle)
33 {
34     Point result;
35     result.x = p.x * cos(angle) - p.y * sin(angle);
36     result.y = p.x * sin(angle) + p.y * cos(angle);
37     return result;
38 }
39 double Area(Point A, Point B, Point C) //三角形面積
40 {
41     return ((B-A)*(C-A) / 2.0);
42 }
43 
44 Point intersection(Point u1,Point u2,Point v1,Point v2){
45     Point ret=u1;
46     double t=((u1.x-v1.x)*(v1.y-v2.y)-(u1.y-v1.y)*(v1.x-v2.x))
47             /((u1.x-u2.x)*(v1.y-v2.y)-(u1.y-u2.y)*(v1.x-v2.x));
48     ret.x+=(u2.x-u1.x)*t;
49     ret.y+=(u2.y-u1.y)*t;
50     return ret;
51 }
52 
53 int main()
54 {
55     int T, cas;
56     Point a, b, c;
57     scanf("%d",&T);
58     for(cas = 0; cas < T; cas++)
59     {
60         scanf("%lf%lf",&a.x, &a.y);
61         scanf("%lf%lf",&b.x, &b.y);
62         scanf("%lf%lf",&c.x, &c.y);
63         if(Area(a,b,c) < 0)swap(b,c);
64         Point p, q, r, s, ans;
65         p = Rotate(b - a,-PI/2+ a;
66         q = Rotate(c - a, PI/2+ a;
67         r = (p + q);
68         r.x/=2; r.y/=2;
69 
70         p = Rotate(c - b,-PI/2+ b;
71         q = Rotate(a - b, PI/2+ b;
72         s = (p + q);
73         s.x/=2; s.y/=2;
74         ans = intersection(a, r, b, s);
75                 printf("%.4lf %.4lf\n",fix(ans.x), fix(ans.y));
76     }
77 }





logics_space 2009-07-11 20:58 發(fā)表評論
]]>
geometry 目錄http://m.shnenglu.com/logics-space/articles/75347.htmllogics_spacelogics_spaceMon, 02 Mar 2009 12:19:00 GMThttp://m.shnenglu.com/logics-space/articles/75347.htmlhttp://m.shnenglu.com/logics-space/comments/75347.htmlhttp://m.shnenglu.com/logics-space/articles/75347.html#Feedback0http://m.shnenglu.com/logics-space/comments/commentRss/75347.htmlhttp://m.shnenglu.com/logics-space/services/trackbacks/75347.html

題號

題目名稱

  知識點(diǎn)

1031

Fence

區(qū)間合并

1039

Pipe

線段相交,枚舉

1066

Treasure Hunt

同異側(cè)位置,枚舉

1106

Transmitters

枚舉

1113

Wall

凸包

1118

Lining Up

枚舉 ,旋轉(zhuǎn),縮放

1133

Stars

枚舉

1151

Atlantis

離散化

1259

The Picnic

動態(tài)規(guī)劃,棧

1265

Area   

pick公式 ?

1266

Cover an Arc.

求圓心,基礎(chǔ)

1269

Intersecting Lines

線段相交

1279

Art Gallery

半平面交

1319

Pipe Fitters

枚舉,數(shù)學(xué)

1375

Intervals

直線與圓的切線

1379

Run Away

逼近 或 三角剖分

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



logics_space 2009-03-02 20:19 發(fā)表評論
]]>
色妞色综合久久夜夜| 午夜精品久久久久久| 色妞色综合久久夜夜| 欧美午夜精品久久久久免费视 | 色综合久久无码五十路人妻| 亚洲女久久久噜噜噜熟女| 久久精品9988| 亚洲国产精品无码久久久不卡| 国产精品久久久久…| 久久久久久精品无码人妻| 人人狠狠综合久久亚洲88| 少妇熟女久久综合网色欲| 93精91精品国产综合久久香蕉| 久久精品无码一区二区三区免费| 无码人妻精品一区二区三区久久 | 亚洲国产精品成人久久蜜臀 | 久久精品国产精品亜洲毛片 | 国产AⅤ精品一区二区三区久久| 色偷偷88欧美精品久久久| 狠狠88综合久久久久综合网| 一级a性色生活片久久无少妇一级婬片免费放 | 一级a性色生活片久久无| 狠狠干狠狠久久| 国产精品久久久久久久久鸭| 亚洲精品无码久久久久sm| 久久精品国产亚洲AV香蕉| 久久久久久久久66精品片| 欧美性大战久久久久久| 久久国产美女免费观看精品 | 人妻精品久久久久中文字幕69 | 久久九九兔免费精品6| 久久人人爽人人爽人人片AV麻豆| 一本久久a久久精品综合夜夜| 精品久久久久久亚洲精品| 亚洲精品无码久久久久去q | 996久久国产精品线观看| 亚洲国产精品久久电影欧美| 久久久久av无码免费网| 亚洲中文字幕无码久久2017| 亚洲乱码中文字幕久久孕妇黑人 | 亚洲午夜久久久久久久久电影网|