自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

风城

静能生慧,勤能补拙,天道酬勤

  • 博客(5)
  • 收藏
  • 关注

转载 POJ 3304 直线与线段相交的判断

参考: http://blog.sina.com.cn/s/blog_6635898a0100n2lv.html 的证明过程 可将问题转化为是否存在一条直线经过所有的线段的判断问题#include<iostream> #include<cmath> #include<cstdio> using namespace std;const int MAX = 105; const double e

2016-08-31 20:47:30 269

原创 POJ 1410 线段相交模版

WA了好多次,有很多小陷阱,第一个是注意输入时的排序,第二注意线段在矩形内部的情况。 题目比较直接 模板抄错,wa了好多次,晕~~~#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using namespace std;const double eps=1

2016-08-31 20:14:30 263

原创 POJ 1269 判断直线的关系:相交,平行,重合

纯用模版即可#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath>using namespace std;struct point { double x,y; point(){} point(double _x,double _y) {

2016-08-30 22:34:59 451

原创 POJ 2398 排序+叉积判断点与直线位置关系+统计

题目与POJ2318基本一样 不同之处是需要对直线位置从左到右(按照平面直角坐标系的习惯)进行排序,最后对结果进行统计即可#include <iostream> #include <cstdio> #include <cstring> #include <algorithm>#define maxn 1000+10struct point { int x,y; };struct Line

2016-08-28 23:36:54 487

原创 POJ2318 叉积判断点与直线的关系

利用叉积判断点和直线的位置关系,确定点在直线的左侧还是右侧 通过查找比较点与各个直线(隔板)之间的关系,确定点所在的区间查找可以用一般方法,因为直线是有序的,但需要考虑0和n的特殊情况。#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring>#define max

2016-08-28 23:32:55 799

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除