半平面交模板const double pi= acos(-1.0);#define
arc(x) (x / 180 * pi)const double EPS = 1e-8;const int Max_N = 105;struct Point{
double x,y; Point(){}...
分类:
其他好文 时间:
2014-04-30 17:00:01
阅读次数:
621
DescriptionFarmer John completed his new barn
just last week, complete with all the latest milking technology. Unfortunately,
due to engineering probl...
分类:
其他好文 时间:
2014-04-29 16:46:46
阅读次数:
371
poj 1279 求半平面交的
面积题目来源:http://poj.org/problem?id=1279分析: 求半平面交的 面积代码如下:const double EPS =
1e-8;const int Max_N = 1505;struct Point{ double x,y; ...
分类:
其他好文 时间:
2014-04-29 16:35:46
阅读次数:
499
2014-04-29
01:05题目:数数从0到n总共有多少个数字‘2’?解法:数位动态规划,可以O(log10(n))时间内解决。代码: 1 // 18.4 Count the
number of 2s from 0 to n. 2 #include 3 using namespace std;....
分类:
其他好文 时间:
2014-04-29 14:44:34
阅读次数:
380
2014-04-29
02:27题目:找出10亿个数中最小的100万个数,假设内存可以装得下。解法1:内存可以装得下?可以用快速选择算法得到无序的结果。时间复杂度总体是O(n)级别,但是常系数不小。代码:
1 // 18.6 Find the smallest one million number....
分类:
其他好文 时间:
2014-04-29 14:27:13
阅读次数:
665
php使用array_rand()函数从数组中随机选择一个或多个元素的方法。使用array_rand()
函数从数组中随机选出一个或多个元素,并返回。array_rand(array,number)参数 描述array 必需。规定输入的数组参数。
www.jbxue.comnumber 可选。默认是...
分类:
Web程序 时间:
2014-04-29 14:08:44
阅读次数:
651
JavaScript 中一共有 5 种基本类型,分别是
String、Number、Boolean、Null 和 Undefined 。前 3 种都比较好理解,后面两种就稍微复杂一点。 Null 类型只有一个值,就是
null ; Undefined 类型也只有一个值,即 undefined 。 n...
分类:
其他好文 时间:
2014-04-29 11:43:47
阅读次数:
484
set nocompatible " 关闭 vi 兼容模式syntax on " 自动语法高亮set
number " 显示行号set ruler " 打开状态栏标尺set shiftwidth=4 " 设定 > 命令移动时的宽度为 4set
textwidth=80 " 设置每行80个字符自动换行...
分类:
其他好文 时间:
2014-04-29 11:42:46
阅读次数:
603
Number SequenceTime Limit: 10000/5000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
9899Accepted Submission(s): 4518Pr...
分类:
其他好文 时间:
2014-04-29 11:28:46
阅读次数:
354
一.基本算法: (1)枚举. (poj1753,poj2965)
(2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295)
(6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图...
分类:
其他好文 时间:
2014-04-29 11:27:47
阅读次数:
489