2007年7月20日

bookshelf

摘要: 题目:Robby bought a new bookshelf, and he wanted to put all his N books on it. The bookshelf contains K layers, and the heights of each layer are variable. That is, the minimum height of one layer is eq... 阅读全文

posted @ 2007-07-20 00:20 woodfish 阅读(345) 评论(0) 推荐(0) 编辑

2007年7月19日

zju 1108

摘要: 大意是说给定n个数对(w1,s1),(w2,s2),(w3,s3)......(wn,sn)现在要求一个序列(a1,a2,a3,...,am)使得有Wa1Sa2>Sa3>Sa4>。。。>Sam现在要求出这个序列的最大长度,并且输出序列中的元素。典型的DP,关键是这里是数对,将数对的第一个元素w从小到达的顺序来对数对排一次序,这样我们就可以不用考虑第一个数了,问题变成了典型的最长单调自序列问题。my... 阅读全文

posted @ 2007-07-19 18:55 woodfish 阅读(377) 评论(0) 推荐(0) 编辑

zju 1013

摘要: 题目大意是说有3种武器,每种都有一个重量w,一个尺寸s,一个战斗系数d,另外,如果把数量分别为c1,c2,c3的3种武器合在一起用,就会得到战斗系数为d4的新武器。现在,有1,2,3...,n量车子来运输武器,每量车子都有最大运输重量和最大运输尺寸,现在用车量来运输武器,要求出能达到的最大战斗系数。这题很明显是一道动态规划题,初看题意感觉跟背包问题挺象的,不过那只是表面现象而已。设f[i][n1]... 阅读全文

posted @ 2007-07-19 00:20 woodfish 阅读(903) 评论(0) 推荐(0) 编辑

2007年7月17日

Google实在太强大了

摘要: 不得不承认googel已经强大过头了Google一个搜索引擎公司现在提供的产品实在太多了,而且都是很好用的。google map,google earth,pisca,code.google.com并且google引领着互联网技术的发展,它本身提供N多技术并且开源,比如google web toolkit,还有google maps也提供api接口,这样我们每个人都可以利用google强大的数据资... 阅读全文

posted @ 2007-07-17 03:27 woodfish 阅读(648) 评论(1) 推荐(0) 编辑

2007年6月28日

PKU 1328 Radar Installation

摘要: Radar Installation Time Limit:1000MS Memory Limit:10000KTotal Submit:2704 Accepted:564 DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other... 阅读全文

posted @ 2007-06-28 12:10 woodfish 阅读(917) 评论(0) 推荐(0) 编辑

PKU1733 URAL1003 Parity game

摘要: Parity game Time Limit:1000MS Memory Limit:65536KTotal Submit:748 Accepted:310 DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of ... 阅读全文

posted @ 2007-06-28 12:09 woodfish 阅读(1040) 评论(1) 推荐(1) 编辑

图的DFS信息构建+割点,桥,极大连通子图三大法宝

摘要: /*******************************图的DFS信息构建 by Optmisticg矩阵: g[i][j] -> 0 : 无边 1 : 可重复访问边 -1: 非可重复访问边说明:以为在无向图中u->v访问之后就不能再从v->u访问了 故{u, v}访问了之后{v, ... 阅读全文

posted @ 2007-06-28 12:05 woodfish 阅读(1470) 评论(0) 推荐(0) 编辑

2007年3月1日

How To Clear Floats Without Structural Marku

摘要: Clearing Floats The Old Fashioned Way 当一个有边框或者有背景的容器包含float时,float不会自动强制迫使容器的高度自动增加以便适应将所有的float包含进去。相反,容器会忽略 float,这样float会超出容器的范围(底部)。那些之用windows下的IE的人员会强烈反抗“那不正确“。的确,IE会根据float自动适 应高度,但那只限于容器有个确定的尺... 阅读全文

posted @ 2007-03-01 01:35 woodfish 阅读(918) 评论(3) 推荐(0) 编辑

2007年2月28日

link-specificity

摘要: I tried to apply CSS to my hyperlinks and the hovering didn't work. How come? Is this another case of browsers being stupid? 阅读全文

posted @ 2007-02-28 22:52 woodfish 阅读(290) 评论(0) 推荐(0) 编辑

2007年2月27日

了解如何通过reverse_iterator的base得到iterator

摘要: 调用reverse_iterator的base成员函数可以产生“对应的”iterator,但这句话有些辞不达意。举个例子,看一下这段代码,我们首先把从数字1-5放进一个vector中,然后产生一个指向3的reverse_iterator,并且通过 reverse_iterator的base初始化一个iterator: Code highlighting produced by Actipro Co... 阅读全文

posted @ 2007-02-27 17:11 woodfish 阅读(1219) 评论(1) 推荐(0) 编辑

导航