~~~~
这三道DP题是逐层递进的,大家可以从前往后做。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1506
http://acm.hdu.edu.cn/showproblem.php?pid=1505
http://acm.hdu.edu.cn/showproblem.php?pid=2870
~~~~
1506:
分别找每...
分类:
其他好文 时间:
2014-08-01 10:57:21
阅读次数:
306
题意 k个人复制m本书 求最小的时间 即把m个数分成k份 使和最大的那份最小
d[i][j]表示i个人完成前j本书需要的时间 有转移方程d[i][j]=min(d[i][j],max(d[i-1][k],s[j]-s[k])) k表示i-1到j之间的所有数 s[k]表示从第一本书到第k本书需要时间的和 初始d[1][i]=s[i];...
分类:
其他好文 时间:
2014-08-01 10:57:11
阅读次数:
199
一直以来在我们所见到的概念中,面向对象语言有三大特性:封装性、继承和多态。
封装性:
在面向对象的语言中存在有类的概念,因此实现了数据和行为(方法)的封装,在外部表现为统一的类或对象。在类的外部要访问类的公有成员(私有成员通过类或对象也是不能访问的),必须通过类名或对象来访问。
继承:
类的继承是在现有类的基础之上创建新的类,实现了代码的重用,并且扩展了现有类的功能的机制。关于继承方面,有...
分类:
其他好文 时间:
2014-08-01 10:56:21
阅读次数:
181
多校中的线段树,看题解出题人的意思这道题目应该不简单。但是好像数据比较弱啊。竟然可以水过去啊、、、
用一个标记,标记当前这一段是否被更新过,如果更新过就为1,否则为0。
一定要注意最后一个空格输出。
Nice boat
Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Ot...
分类:
其他好文 时间:
2014-08-01 10:56:01
阅读次数:
202
ioctl.h 分析
我自己画了个解析图。。。不要嫌弃丑啊。。。哈哈
type
The magic number. Just choose one number (after consultingioctl-number.txt ) and use it throughout the driver. This field is eight b...
分类:
其他好文 时间:
2014-08-01 10:55:41
阅读次数:
234
没有什么技术性的分析,只是个人吐槽而已。
一般人遇到问题就会说一句“百度一下”,说实话,百度在中国推广的真的很不错,可谓是家喻户晓,搜索个八卦新闻,小文章,小电影什么的的确很不错,
但是我发现,在百度上搜索“技术类”文章真的让我很失望啊,反倒是在google上搜索技术类很快就能找到答案。
最近很多人可以发现,google现在上不去了。不管是台湾的服务器或者是香港的服务器都上不去了。
这...
分类:
其他好文 时间:
2014-08-01 10:55:31
阅读次数:
199
题意:给出袋子的体积和骨头的个数,然后又给出每个骨头的价值和体积,求袋子最多能装的骨头的价值
难点;这道题是最基础的01背包题,不懂得话推荐看《背包九讲》
AC by SWS
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2602
代码:
#include
#include
typedef struct{
int w, v;
}str;...
分类:
其他好文 时间:
2014-08-01 10:55:11
阅读次数:
215
第一次使用 队列+邻接表 处理拓扑排序,这里做出详细解释以及结合图标,希望下次能一目了然,也希望能帮到大家...
分类:
其他好文 时间:
2014-08-01 10:54:41
阅读次数:
204
Description
At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements are po...
分类:
其他好文 时间:
2014-08-01 10:54:34
阅读次数:
209
Problem Description
Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees...
分类:
其他好文 时间:
2014-08-01 10:54:28
阅读次数:
315
迷瘴
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3819 Accepted Submission(s): 1316
Problem Description
通过悬崖的yifenfei,又面临着幽谷的考验...
分类:
其他好文 时间:
2014-08-01 10:54:20
阅读次数:
194
题解:对于输入的边,我们首先按照速度从大到小排序,然后对于每一次询问,st end 两个城市,我们暴力枚举,
for(int i = 0; i
上马:
//187MS 300K
#include
#include
using namespace std;
#define MAX 205
#define INF 1<<30
int N,M,Q;
struct Edge
{
...
分类:
其他好文 时间:
2014-08-01 10:53:31
阅读次数:
204
Problem Description
A few days ago, Tom was tired of all the PC-games, so he went back to some old FC-games. "Hudson's Adventure Island" was his favorite which he had played thousands of times. But t...
分类:
其他好文 时间:
2014-08-01 10:53:21
阅读次数:
300
题意:中文题,不翻译。。
策略:观察可知,第i张牌 如果小于等于n 那么他的序号就会变为i*2, 如果大于n 那么就会变成(i-n)*2-1 故 只需要模拟下就好了
AC by SWS
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1210
代码:
#include
int main()
{
int n, cur, pre;
whil...
分类:
其他好文 时间:
2014-08-01 10:53:11
阅读次数:
231