码迷,mamicode.com
首页 >  
搜索关键字:eps    ( 1532个结果
uva 11827 Maximum GCD(输入技巧)
题意:对于给定的一组数,求该组数中两两gcd的最大值;思路:简单gcd,亮点在于每组数的个数并不提供,因此需要在读入是做出判断;#include#include#include#includeusing namespace std;#define eps 1e-5int t,i,j,k,num[50...
分类:其他好文   时间:2015-04-05 11:58:45    阅读次数:160
关于cout的一个小测试
以前知道使用cout 测试代码: /** 吉林大学 Jilin U Author: sinianluoye (JLU_LiChuang) Date: 2015-3 Usage: **/ #include #include #include #include #include #define ll long long #define eps 1e-8 #...
分类:其他好文   时间:2015-03-31 10:58:04    阅读次数:163
【计算几何】【凸包】bzoj2829 信用卡凸包
http://hzwer.com/6330.html#include#include#includeusing namespace std;#define N 100001#define EPS 0.00000001typedef double db;const db PI=acos(-1.0);s...
分类:其他好文   时间:2015-03-30 18:39:02    阅读次数:151
The area of the union of circles
#include #include #include using namespace std; const double eps=1e-8; const double PI=acos(-1.0); struct Circle{ double x,y,r; Circle(){} Circle(double xx,double yy){x=xx;y=yy;} }; struct...
分类:其他好文   时间:2015-03-28 14:27:03    阅读次数:148
LA 4064 (计数 极角排序) Magnetic Train Tracks
这个题和UVa11529很相似。枚举一个中心点,然后按极角排序,统计以这个点为钝角的三角形的个数,然后用C(n, 3)减去就是答案。另外遇到直角三角形的情况很是蛋疼,可以用一个eps,不嫌麻烦的话就用整数的向量做点积。 1 #include 2 #include 3 #include 4 us...
分类:编程语言   时间:2015-03-28 11:23:06    阅读次数:179
UVA 10522 - Height to Area(计算几何)
这题就海伦公式带进去就可以了。。 要注意的是,这题的样例,是输入n次错误的输入才停止。。,输入的可能是负数。 代码: #include #include #include #include using namespace std; const double eps = 1e-8; int t; double Ha, Hb, Hc; int dcmp(double x) { ...
分类:其他好文   时间:2015-03-27 22:17:09    阅读次数:149
【计算几何】【斜率】bzoj1610 [Usaco2008 Feb]Line连线游戏
枚举直线,计算斜率,排序,统计答案。#include#include#includeusing namespace std;#define EPS 0.00000001#define INF 99999999999999999999.0#define N 201typedef double db;i...
分类:其他好文   时间:2015-03-27 21:55:30    阅读次数:125
单位圆的最多覆盖据点 (重点需要学习!)
我自己的代码,提交错误,需要修改#include #include #include #include #include #include #include #include #define eps 1e-8using namespace std;struct point{ double x; do...
分类:其他好文   时间:2015-03-21 21:20:53    阅读次数:212
Subway Icon Set – 306个像素完美的特制图标
这个图标集是306个优化的像素完美,精雕细琢的图标。为这些设备进行了优化:iOS、Windows Phone、Windows 8 and BlackBerry 10,提供 PNG, SVG, XALM, PSD, CSH, SKETCH, PDF, AI 和 EPS 格式。
分类:其他好文   时间:2015-03-20 12:23:23    阅读次数:171
poj 3129 How I Wonder What You Are! 点积求两向量夹角
水题,直接贴代码。 //poj 3129 //sep9 #include #include using namespace std; const double eps=0.00000001; struct P{ double x,y,z; }p[512],tel[64]; double a[64]; int main() { int i,j,cnt,n,m; while(scanf("...
分类:其他好文   时间:2015-03-20 09:25:09    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!