Bugs Integrated, Inc.
Time Limit: 15000MS
Memory Limit: 30000K
Total Submissions: 8825
Accepted: 3381
Case Time Limit: 5000MS
Description
Bugs Integrated, Inc. i...
分类:
其他好文 时间:
2014-06-05 12:00:52
阅读次数:
348
Catch That Cow
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 43851
Accepted: 13674
Description
Farmer John has been informed of the location of a fugitiv...
分类:
其他好文 时间:
2014-06-05 07:45:38
阅读次数:
220
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1520
题目大意:给定一棵关系树,每个节点有个权值,子节点和父节点不能同时选,问最后能选的最大价值是多少?
解题思路:树形DP入门题。由于子节点与父节点不能同时选,有人可能会用贪心思想,二者选其一肯定最优。其实不然,有可能父节点和子节点都不选,而要选子孙节点。不过只要再往深点想下,就可以得出...
分类:
其他好文 时间:
2014-06-05 07:40:29
阅读次数:
255
题意:求'X'围成的周长
思路:按理说每增加一个就是周长加4,但是要减去重复的地方,这里我是用BFS做的,如果是BFS的模板思路的话是不行的,应该要先取出再标记
#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 30;
struct node {
int x,y;
...
分类:
其他好文 时间:
2014-06-05 06:23:39
阅读次数:
221
这是动态规划?我一点思路怎么也没有。最后还是用矩阵部分求和枚举0MS。
题目大意:
给出一个矩阵,上面有几个点。在给一个小点儿的矩阵,求这个矩阵最多能套上几个点。(注意:小矩阵长宽给定,不能旋转)。
解题思路:
建立数组num[i][j]代表点(1,1)到点(i,j)组成的矩阵里有几个点。
下面是代码:
#include
#include
int num[1...
分类:
其他好文 时间:
2014-06-05 06:14:33
阅读次数:
226
题目:http://poj.org/problem?id=1056题意:判断是否有串是其他串的前缀#include#include#include#include#include#include#include#includeusing
namespace std;struct Node{ i...
分类:
其他好文 时间:
2014-05-31 07:46:48
阅读次数:
227
可用贪心算法解决的几个基本问题分类:算法2011-08-24
12:36950人阅读评论(0)收藏举报算法活动作业c关键:看问题有没有贪心选择性质和最优子结构性质。有些问题看似是可以用贪心算法,但是实际用贪心算法却得不到最优解。构造贪心算法后,需要一定的证明来确定它的正确性。常用证明方法:反证法、调...
分类:
其他好文 时间:
2014-05-31 02:57:58
阅读次数:
188
POJ训练计划Step1-500题 UVaOJ+算法竞赛入门经典+挑战编程+USACO
请见:http://acm.sdut.edu.cn/bbs/read.php?tid=5321 一、POJ训练计划 Moon修订 298道题集训第一天
POJ纯水题 = =: 17道题 2017 1218 200...
分类:
其他好文 时间:
2014-05-31 01:31:16
阅读次数:
361
DescriptionGiven a set of sticks of various
lengths, is it possible to join them end-to-end to form a square?InputThe first
line of input contains N, ...
分类:
其他好文 时间:
2014-05-30 21:21:54
阅读次数:
284
DescriptionAn ascending sorted sequence of
distinct values is one in which some form of a less-than operator is used to
order the elements from smalle...
分类:
其他好文 时间:
2014-05-30 14:31:10
阅读次数:
297