题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=904题意: 看图, 给出D,
和 抠掉的木材的体积V, 求图中 d.圆柱体积: pi * r^2 * h圆台体积: pi * (r1 ^2 + r2^2 + r1 *r2...
分类:
其他好文 时间:
2014-05-09 10:43:33
阅读次数:
362
ZOJ Problem Set - 3780
Paint the Grid Again
Time Limit: 2 Seconds Memory Limit: 65536 KB
Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black ...
分类:
其他好文 时间:
2014-05-09 02:00:35
阅读次数:
506
1: /** 2: ZOJ 3229 有上下界的最大流 3: 两次求最大流的过程,非二分 4:
有源汇上下界的最大流问题, 首先连接 sink -> src, [0,INF]. 5: 根据net的正负,来建立 Supersrc 与 supersink
之间的边,做一次 maxflow. 6: 若所有...
分类:
其他好文 时间:
2014-05-08 22:39:11
阅读次数:
412
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=806题意:凸四边形上
有8个点, 4个顶点 , 和 每2个顶点的中点。经过这8个点的每一条线段,将四边形分成2份, 求这两份面积最近的面积。分析: 枚举, 每条线段, 计...
分类:
其他好文 时间:
2014-05-08 18:44:03
阅读次数:
284
Consider a simple function that adds the first
N integers. (e.g.sum(5) = 1 + 2 + 3 + 4 + 5 = 15).Here is a simple Python
implementation that uses recu...
分类:
其他好文 时间:
2014-05-08 17:35:09
阅读次数:
286
建立403error页面,403.html<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>Error403</title></head><body><b><fontsize=5>S..
分类:
其他好文 时间:
2014-05-08 16:42:09
阅读次数:
541
在2^k*2^k个方格组成的棋盘中,有一个方格被占用,用下图的4种L型骨牌覆盖所有棋盘上的其余所有方格,不能重叠。
代码如下:
def chess(tr,tc,pr,pc,size):
global mark
global table
mark+=1
count=mark
if size==1:
return
half=size//2
if pr<t...
分类:
编程语言 时间:
2014-05-08 16:04:51
阅读次数:
367
对于无源汇问题,方法有两种. 1 从边的角度来处理. 新建超级源汇,
对于每一条有下界的边,x->y, 建立有向边 超级源->y ,容量为x->y下界,建立有向边 x->
超级汇,容量为x->y下界.建立有向边 x->y,容量为x->y的上界减下界. 2 从点的角度来处理. 新建超级源汇,对于每个点...
分类:
其他好文 时间:
2014-05-08 15:18:48
阅读次数:
306
六个创建型模式简单工厂模式-Simple Factory Pattern
工厂方法模式-Factory Method Pattern抽象工厂模式-Abstract Factory Pattern单例模式-Singleton
Pattern原型模式-Prototype Pattern建造者模式-...
分类:
其他好文 时间:
2014-05-08 10:25:50
阅读次数:
303
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3728
题目意思:
给一个以原点(0,0)为圆
Collision
Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge
There's a r...
分类:
其他好文 时间:
2014-05-08 03:55:33
阅读次数:
417