uva 11178】的更多相关文章

题目链接:UVA 11178 Description Input Output Sample Input Sample Output Solution 题意 \(Morley's\ theorem\) 指任意三角形的每个内角的三等分线相交的三角形为等边三角形. 给出三角形的每个点的坐标,求根据 \(Morley's\ theorem\) 构造的等边三角形的三个点的坐标. 题解 对于点 \(D\),只需求直线 \(BC\) 绕点 \(B\) 旋转 \(\frac{1}{3} \angle ABC\…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2119 11178 - Morley's Theorem Time limit: 3.000 seconds Problem DMorley’s TheoremInput: Standard Input Output: Standard Output Morley’s theorem stat…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=9 题意: Morlery定理是这样的:作三角形ABC每个内角的三等分线.相交成三角形DEF.则DEF为等边三角形,你的任务是给你A,B,C点坐标求D,E,F的坐标 思路: 根据对称性,我们只要求出一个点其他点一样:我们知道三点的左边即可求出每个夹角,假设求D,我们只要将向量BC 旋转rad/3的到直线BD,然后旋转向量CB然后得到CD,然后就是求两直线的交点了.…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2119 题目大意: Morley定理是这样定义的,做三角形ABC每个内角的三等分线,相交成三角形DEF,则DEF是等边三角形.如图,你的任务是根据A,B,C三个点的位置确定D.E.F的位置. 思路: 把BC边旋转三分之一的角ABC,CB边旋转三分之一的角ACB,然后求交点D就出来了.其他的同理…
题目大意: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2119 向量旋转的推导 #include <bits/stdc++.h> using namespace std; ; double add(double a,double b) { ; return a+b; } struct P { double x,y; P()…
题意: Morley定理:任意三角形中,每个角的三等分线,相交出来的三个点构成一个正三角形. 不过这和题目关系不大,题目所求是正三角形的三个点的坐标,保留6位小数. 分析: 由于对称性,求出D点,EF也是同样的. 用点和向量的形式表示一条直线,向量BA.BC的夹角为a1,则将BC逆时针旋转a1/3可求得 直线BD,同理也可求得直线CD,最后再求交点即可. //#define LOCAL #include <cstdio> #include <cstring> #include &l…
题意:根据A,B,C三点的位置确定D,E,F三个点的位置. 贴模板 #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<iostream> #include<memory.h> #include<cstdlib> #include<vector> #define clc(a,b) memset(a,b,s…
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18543 [思路] 旋转+直线交点 第一个计算几何题,照着书上代码打的. [代码] #include<cstdio> #include<cmath> #include<cstring> using namespace std; struct Pt { double x,y; Pt(,):x(x),y(y) {} }; typedef Pt…
Problem D Morley's Theorem Input: Standard Input Output: Standard Output Morley's theorem states that that the lines trisecting the angles of an arbitrary plane triangle meet at the vertices of an equilateral triangle. For example in the figure below…
#include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<queue> #include<vector> using namespace std; struct Point{ double x,y; Point(, ) : x(x),y(y){ } //构造函数 }; typedef…