find the safest roadTime Limit: 10000/5000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
6119Accepted Submission(s): 2...
分类:
其他好文 时间:
2014-05-27 02:49:10
阅读次数:
229
A + B Problem IITime Limit: 2000/1000 MS
(Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s):
201400Accepted Submission(s): 3859...
分类:
其他好文 时间:
2014-05-24 04:18:59
阅读次数:
353
密码Time Limit: 2000/1000 MS (Java/Others)Memory
Limit: 65536/32768 K (Java/Others)Total Submission(s): 28587Accepted
Submission(s): 11412Problem Descri...
分类:
其他好文 时间:
2014-05-24 04:05:43
阅读次数:
272
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
解题思路:
给出一堆单词,看能不能找到 一个或几个单词相连,使得首字母为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
HDU 4734 F(x)
解题思路
给定A,B, 在[0,B]之间的数字假设为i,问你有多少数字 f[i] 值小于f[A]
解题思路:
数位DP,只需按照位数转移为缩短1位的子问题即可...
分类:
其他好文 时间:
2014-05-22 09:37:11
阅读次数:
275
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
http://acm.hdu.edu.cn/showproblem.php?pid=3461并差集和幂取模这道题主要是求不可操作区间。 1 #include 2
#include 3 #include 4 #include 5 #define maxn 10000010 6 #define ...
分类:
其他好文 时间:
2014-05-19 14:02:10
阅读次数:
223