E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
intersecting
poj 1269
Intersecting
Lines 直线交点
IntersectingLinesTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 8222 Accepted: 3746DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinon
cyendra
·
2013-06-16 15:00
题解
POJ1269
Intersecting
Lines
TimeLimit:1000MS MemoryLimit:10000KTotalSubmissions:8206 Accepted:3736DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinoneofthreeways:1)nointe
wangwenhao00
·
2013-06-04 21:00
poj 1269
Intersecting
Lines 计算几何 直线求交点
题目链接自己请教了队长和军哥,终于明白了模版的思想了。模版还需要自己再写一遍的。还有要注意的是对于g++编译器来讲输出要用%f 而对c++编译器来讲,要用%lf这是要注意的。#include #include #include #include usingnamespacestd; structpoint{ doublex,y; point(doublea,doubleb):x(a),y(b){
yangshuolll
·
2013-05-17 22:00
算法
POJ 1269
Intersecting
Lines(判断直线的位置关系)
第一道计算几何。什么也不会-_-|||先涨点姿势:#defineeps1e-8 intsig(doubled) { return(d>eps)-(d0,则P在Q的顺时针方向若PXQ<0,则P在Q的逆时针方向若PXQ=0,则P与Q共线。显然当sig(s1)==0&&sig(s2)==0两向量共线而当sig(s2-s1)==0时两向量平行。下面只剩相交的情况,求交点什么的还是不会,先贴下ZEROm牛的
z690933166
·
2013-05-13 21:00
POJ 1269
Intersecting
Lines
Intersecting
Lines Time Limit: 1000MS Memory Limit: 10000K Total
·
2013-03-17 16:00
intersect
POJ 1269
Intersecting
Lines(计算几何 求交点)
题意:求共线,平行或交点#include #include #include #include #include #include usingnamespacestd; constdoubleEPS=1e-6; constdoubleINF=1e20; boolzero(doublea){return-EPS0?t:-t;} doublelength(cvectora){returnsqrt(a
binwin20
·
2012-09-05 20:00
POJ 1269
Intersecting
Lines
题目大意:求直线相交交点、或者判断共线,比线段相交简单些,(前者可利用方程,后者要先判断是否相交,然后用面积法求得交点)思路:克莱姆法则 题目大意:给出四个点确定两条直线。如果是一条线输出“LINE”,如果平行输出“NONE”,如果有交点输出交点坐标。思路:注意是直线,不是线段啊。用两点式推出两条直线方程:(y1-y2)x+(x2-x1)y=x2y1-x1y2;(y3-y4)x+(x4-x3)y=
kg_second
·
2012-09-03 22:00
c
output
POJ - 1269:
Intersecting
Lines__判断两直线相交
DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinoneofthreeways:1)nointersectionbecausetheyareparallel,2)intersectinalinebecausetheyareontopof
duanxian0621
·
2012-08-06 15:00
poj 1269
Intersecting
Lines(判断直线相交 求交点)
IntersectingLinesTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 6884 Accepted: 3207DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinon
fp_hzq
·
2012-08-01 20:00
【计算几何】 poj1269
Intersecting
Lines
IntersectingLineshttp://poj.org/problem?id=1269DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinoneofthreeways:1)nointersectionbecausetheyarep
ACM_Ted
·
2012-08-01 19:00
poj 1269
Intersecting
Lines
poj1269IntersectingLines 题目意思是给出2条直线,然后判断其是否相交,平行,还是重合。刚开始以为是判断2条线段的关系,用了黑书的模板写了,发现连样例都过不了。后面改了很多才过了。先判断2条直线所在的向量是否平行,这个可以判断这2个向量的叉积是否为0,然后再判断线段是否重合,可以选3点判断叉积是否为0。如果向量不平行的话,直接求交点。求交点的公式是用了黑书里面的方法,先求出
yx
·
2012-07-17 15:00
poj 1269
Intersecting
Lines
题意:若两直线平行,输出NONE 两直线相交输出交点 两直线为同一直线,输出LINE#include #defineINF0xfffffff structPoint { intx,y; }; Pointlist[5]; intmain(intargc,char*argv[]) { intT,i; floatk12,k13,k34,k14; floatX,Y; s
Tdreamge
·
2012-03-21 17:00
POJ 1269
Intersecting
Lines
IntersectingLinesTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 6233 Accepted: 2939DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinon
cmonkey_cfj
·
2012-02-19 23:00
POJ 1269
Intersecting
Lines (两直线之间的位置关系)
题意:判断两直线之间的位置关系,平行,重合,相交题解:注意精度#include #include usingnamespacestd; #defineMAX100 #defineeps1e-8 #definezero(x)(((x)>0?(x):-(x))
Tsaid
·
2011-11-06 16:00
struct
output
parallel
poj 1269
Intersecting
Lines
别人的代码,很简洁#include intmain() { intn,m; doublex1,x2,x3,x4,y1,y2,y3,y4,b,a,c,d,x0,y0; scanf("%d",&n); m=n; while(n--){ scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4); a=x2-x1;
qq172108805
·
2011-08-06 20:00
zoj 1280 || poj 1269
Intersecting
Lines
给你两条直线,判断这两条直线是否共线,相交,不相交(即平行),相交的话输出交点。 判断平行,然后通过叉积判断是否共线。 平行判断可以判断两条直线的斜率是否相等。 交点的话,相当于联立方程组求解了。 这些方程看模板理解的,刚才搜了下,有人讲得比较清楚,借鉴下http://blog.csdn.net/dreamvyps/archive/2011/01/25/6162690.aspx 如何判断是否同线
zxy_snow
·
2011-04-22 13:00
c
struct
parallel
POJ 1269
Intersecting
Lines 判断直线相交并求交点
POJ1269IntersectingLines判断直线相交并求交点IntersectingLinesTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:4260Accepted:2049DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairofli
Vontroy
·
2010-10-03 11:00
zoj1820
Intersecting
Lines
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1280题目是讲两个点确定一条直线,那么给你两组,就是两条直线,请你说明这是平行还是覆盖还是相交,如果相交那么给出焦点。就是那么简单,简单的数学运算。需要注意的是有些人喜欢用斜率,但是直线可以出现平行于y轴的,也就是斜率无限大,需要注意。我是用分数表示斜率的,所以避免了这个问
cherry_sun
·
2009-11-04 22:00
c
float
Intervals P1089 ACM Problem
The sum of those intervals may berepresented as a sum of closed pairwise non−
intersecting
intervals.
zhang_xzhi_xjtu
·
2009-09-30 13:00
intervals acm
pku 1269
Intersecting
Lines(求两直线交点,解二元二次方程)
给定4个点坐标,前2个点确定一条直线,后2个点确定一条直线。判断2直线的关系:重合,平行,相交。如果相交,给出交点坐标。根据点坐标,可以给出两个直线方程。ax+b=cydx'+e=fy'#includeusingnamespacestd;intmain(){intN,x1,x2,x3,x4,y1,y2,y3,y4;inta,b,c,d,e,f;scanf("%d",&N);printf("INTE
logic_nut
·
2009-08-17 09:00
The Number of Triangles Formed by
Intersecting
Diagonals of a Regular Polygon
Reproducedfromhttp://www.cs.uwaterloo.ca/journals/JIS/sommars/newtriangle.htmlJournalofIntegerSequences,Vol.1(1998),Article98.1.5TheNumberofTrianglesFormedbyIntersectingDiagonalsofaRegularPolygonSteve
ihuashao
·
2009-01-09 19:00
J#
UP
The Number of Triangles Formed by
Intersecting
Diagonals of a Regular Polygon
Reproducedfromhttp://www.cs.uwaterloo.ca/journals/JIS/sommars/newtriangle.htmlJournalofIntegerSequences,Vol.1(1998),Article98.1.5TheNumberofTrianglesFormedbyIntersectingDiagonalsofaRegularPolygonSteve
ihuashao
·
2009-01-09 19:00
J#
UP
Pku 1269
Intersecting
Lines
Pku1269IntersectingLines#include #include #include struct Point{ double x, y;};bool line( Point a, Point b, Point c ){ return ( b.x- a.x )* ( c.y- b.y )== ( b.y- a.y )* ( c.x- b.x );}bool none(
算法学习
·
2008-12-07 13:00
上一页
1
2
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他