UVa 11437 (梅涅劳斯定理) Triangle Fun】的更多相关文章

题意: 给出三角形ABC顶点的坐标,DEF分别是三边的三等分点.求交点所形成的三角形PQR的面积. 分析: 根据梅涅劳斯定理,我们得到: ,解得 另外还有:,解得 所以AR : RP : PD = 3 : 3 : 1 同理,BE和CF也被分成这样比例的三段. △ADC = (2/3)△ABC △CDR = (4/7)△ADC △CPR = (3/4)△CDR △PQR = (1/2)△CPR 所以:△PQR = (1/7)△ABC #include <cstdio> #include <…
题目传送门 题意:三角形三等分点连线组成的三角形面积 分析:入门题,先求三等分点,再求交点,最后求面积.还可以用梅涅劳斯定理来做 /************************************************ * Author :Running_Time * Created Time :2015/10/22 星期四 12:55:27 * File Name :UVA_11437.cpp *********************************************…
Problem ATriangle Fun Input: Standard Input Output: Standard Output In the picture below you can see a triangle ABC. Point D, E and F divides the sides BC, CA and AB into ratio 1:2 respectively. That is CD=2BD, AE=2CE and BF=2AF. A, D; B, E and C, F…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2432 题目大意: 如图,定义三角形ABC,在BC,CA,AB上分别取边D,E,F,使得CD=2BD,AE=2CE,BF=2AF,求三角形PQR的面积. 思路: 先求出D,E,F三点坐标,然后求出PQR三点坐标,最后对pr,pq进行叉乘,所得的一般即为答案. #include<cstdi…
计算几何: 直线交点: #include<cstdio> using namespace std; struct node { double x,y; node(,):x(x),y(y){ } }a,b,c,d,e,f,p,q,r; node operator-(node u,node v){return node(u.x-v.x,u.y-v.y);} node operator+(node u,node v){return node(u.x+v.x,u.y+v.y);} node opera…
题目链接: 传送门 Graph Construction Time Limit: 3000MS     Memory Limit: 65536K Description Graph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different ways to represent graph in computer. It can…
题意:给定一个NxNxN的正方体,求出最多能选几个整数点,使得任意两点PQ不会使PQO共线. 思路:利用容斥原理,设f(k)为点(x, y, z)三点都为k的倍数的点的个数(要扣掉一个原点O),那么所有点就是f(1),之后要去除掉共线的,就是扣掉f(2), f(3), f(5)..f(n),n为素数.因为这些素数中包含了合数的情况,并且这些点必然与f(1)除去这些点以外的点共线,所以扣掉.但是扣掉后会扣掉一些重复的,比如f(6)在f(3)和f(2)各被扣了一次,所以还要加回来,利用容斥原理,答案…
https://cn.vjudge.net/problem/UVA-12165 题目 给出D.E.F分BC,CA,AB的比$m_1:m_2$,$m_3:m_4$,$m_5:m_6$和PQR三点的坐标,求ABC三点的坐标 题解 利用梅涅劳斯定理,找出直线和三边的交点,然后每个边按顺序乘下去 可以写出三个方程 \[\frac{AR}{RP}\cdot\boxed{\frac{PQ}{QB}}\cdot\frac{BF}{FA}=1\] \[\frac{BP}{PQ}\cdot\boxed{\frac…
//第一期 计算几何题的特点与做题要领: 1.大部分不会很难,少部分题目思路很巧妙 2.做计算几何题目,模板很重要,模板必须高度可靠. 3.要注意代码的组织,因为计算几何的题目很容易上两百行代码,里面大部分是模板.如果代码一片混乱,那么会严重影响做题正确率. 4.注意精度控制. 5.能用整数的地方尽量用整数,要想到扩大数据的方法(扩大一倍,或扩大sqrt2).因为整数不用考虑浮点误差,而且运算比浮点快. 一.点,线,面,形基本关系,点积叉积的理解 POJ 2318 TOYS(推荐) http:/…
Problem Description In Geometry, the problem of track is very interesting. Because in some cases, the track of point may be beautiful curve. For example, in polar Coordinate system,ρ=cos3θ is like rose, ρ=1−sinθ is a Cardioid, and so on. Today, there…