UVA 11178 Morley定理 二維幾何問題

2021-07-22 02:36:02 字數 863 閱讀 6831

uva 11178 morley定理

morley定理:作三角形abc每個內角的三等分線,相交成三角形def,則def是等邊三角形。

輸入t樣例數,之後輸入一行6個整數xa,ya,xb,yb,xc,yc;

輸出六個實數xd,yd,xe,ye,xf,yf;

解題思路:

1,這題就是呼叫我們之前準備模版裡面的函式就能實現

2,這種題能加深對模版的理解程度

#include#include#include#includeusing namespace std;

struct point

};typedef point vector ;

double dot(vector a,vector b)

double length(vector a)

vector operator - (point a,point b)

vector operator + (vector a,vector b)

vector operator * (vector a,double p)

double angle(vector a,vector b)

vector rotate(vector a,double rad)

double cross(vector a,vector b)

point getlineintersection(point p,vector v,point q,vector w)

point read_point()

point getd(point a,point b,point c)

int main()

return 0;

}

uva 11178 計算幾何

函式較多,作為模板。include include include using namespace std struct point 定義點的時候直接利用建構函式,很方便 typedef point vector 這裡因為向量都有兩個維度的有序參量 vector operator vector a,...

UVA 11178 計算幾何

題目大意 求乙個三角形中每個內角的角三等分線組成的三角形的三個點的座標 題目解析 沒有演算法可言,直接上模板 ac includeusing namespace std struct point typedef point vector vector operator vector a,vector...

uva11582 斐波拉切數列迴圈節 尤拉定理降冪

the i th fibonacci number f i is recursively defined in the following way f 0 0 and f 1 1 f i 2 f i 1 f i for every i 0 your task is to compute some v...