Color the ballTime Limit: 9000/3000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
7941Accepted Submission(s): 4070Prob...
分类:
其他好文 时间:
2014-05-23 11:58:12
阅读次数:
314
HDU 题目分类
模拟题, 枚举
1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1...
分类:
其他好文 时间:
2014-05-22 11:59:02
阅读次数:
198
解题思路:
给出一堆单词,看能不能找到 一个或几个单词相连,使得首字母为b,末字母为m,如果可以输出YES,否则NO。 如果几个单词相连,要求相邻单词首末字母相同,如 big got them.思路是建立状态表,边输入边建立表, 比如单词ab,则c[0][1]=1,输入结束后,初步的表建立完成,那么连接单词,就要查找,根据状态表,找以b开头的单词,b-a,b-c,b-d.....z,最多找25次...
分类:
其他好文 时间:
2014-05-22 11:56:29
阅读次数:
232
题目:
链接:点击打开链接
算法:
赤裸裸的并查集。
代码:
#include
#include
#include
using namespace std;
int n,m;
int root[1010];
int find(int x)
{
int r = x;
while(root[r] != r)
r = root[r];
...
分类:
其他好文 时间:
2014-05-22 10:36:30
阅读次数:
219
Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955
背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱 最脑残的是把总的概率以为是抢N家银行的概率之和…
把状态转移方程写成了f[j]=max{f[j],f[j-q[i].v]+q[i].money}(f[j]表示在概...
分类:
其他好文 时间:
2014-05-22 09:43:12
阅读次数:
282
HDU 4734 F(x)
解题思路
给定A,B, 在[0,B]之间的数字假设为i,问你有多少数字 f[i] 值小于f[A]
解题思路:
数位DP,只需按照位数转移为缩短1位的子问题即可...
分类:
其他好文 时间:
2014-05-22 09:37:11
阅读次数:
275
N皇后问题
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7743 Accepted Submission(s): 3481
Problem Description
在N*N的方格棋盘放置了N个皇后,使得它...
分类:
其他好文 时间:
2014-05-22 08:21:38
阅读次数:
147
HDU 3910 Liang Guo Sha
题目大意:
If both of them choose “Sha”, then Alice gets A points, and Bob loses A points; if both of them choose “Shan”, then Alice gets B points, and Bob loses B points; otherwise, Bob gets C points, and Alice loses C points.
给定A B ...
分类:
其他好文 时间:
2014-05-22 06:22:40
阅读次数:
281
5道题目分别是:【Largest Rectangle in Histogram】、【Minimum Path Sum】、【Jump Game】、【Jump Game II 】、【Valid Number】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录。...
分类:
其他好文 时间:
2014-05-21 03:05:33
阅读次数:
481