原题: 求两直线交点 思路借鉴于:http://blog.csdn.net/zxy_snow/article/details/6341282 感谢大佬 #include<cstdio> #include<algorithm> #include<cstring> #define eps 1e-8 using namespace std; int T; struct point//点(向量的结构体) { double x,y; point() {}//初始化 point (…
POJ原题 ZOJ原题 多组数据.每次给出四个点,前两个点确定一条直线,后两个点确定一条直线,若平行则输出"NONE",重合输出"LINE",相交输出"POINT"+交点坐标(保留两位小数) 先判重合:两条线重合意味着四点共线,即ABC共线且ABD共线(共线即为叉积=0) 再判平行:正常的数学方法,\(\overrightarrow{AB}\) // \(\overrightarrow{CD}\) 求交点: //这个公式很好用,背下来好伐 #in…
Mirror and Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 650    Accepted Submission(s): 316 Problem Description The light travels in a straight line and always goes in the minimal path b…
题目链接:http://poj.org/problem?id=1269 题意:给你两条直线上的任意不同的两点,然后求两条直线的位置关系,如果相交于一点输出该点坐标; #include<iostream> #include<algorithm> #include<math.h> #include<string.h> #include<stdio.h> #include<map> #include<vector> #inclu…
题面 题意:给你n个圆,每个圆有一个权值,你可以选择一个点,可以获得覆盖这个点的圆中,权值最大的m个的权值,问最多权值是多少 题解:好像是叙利亚的题....我们画画图就知道,我们要找的就是圆与圆交的那部分里面的点,我们再仔细看看, 2个圆的交点一定在啊! 别急啊,两个圆包含了,都是交点,取哪呢?当然小圆圆心就够了啊(圆又不多,写的时候直接把所有的圆心都丢进去了) 然后枚举判断每个点有没有被在m个圆中就行了,这里维护最大的m个,用个堆就好了 #include<bits/stdc++.h> usi…
POJ_1269_Intersecting Lines_求直线交点 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect in…
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,然后就是求两直线的交点了.…
Problem DMorley’s TheoremInput: 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 t…
Line.h #pragma once //Microsoft Visual Studio 2015 Enterprise //根据两点式方法求直线,并求两条直线的交点 #include"BoundaryPoint.h" #include"Coordinates.h" class Line { public: Line GetLine(BoundaryPoint sourcePoint, BoundaryPoint endPoint); Line GetLine(C…
Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12421   Accepted: 5548 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three…