Bone CollectorTime Limit:1000msMemory Limit:32768KBThis problem will be judged on HDU. Original ID:260264-bit integer IO format:%I64d Java class name:...
分类:
其他好文 时间:
2014-07-09 19:57:40
阅读次数:
213
What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 12773Accepted Submiss...
分类:
其他好文 时间:
2014-07-09 19:41:51
阅读次数:
141
http://acm.hdu.edu.cn/showproblem.php?pid=1863畅通工程Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): ...
分类:
其他好文 时间:
2014-07-09 18:05:10
阅读次数:
223
双向广搜(2011-08-31 16:45:24)Eight题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1043讲到双向广搜,那就不能不讲经典的八数码问题,有人说不做此题人生不完整 。所谓双向广搜,就是初始结点向目标结点和目标结点向初始结点同时扩展,...
分类:
其他好文 时间:
2014-07-08 22:39:42
阅读次数:
422
HDU 3537 Daizhenyang's Coin(博弈-sg)
题目大意:
有一排硬币,告诉 你n个正面朝上的硬币的位置,你可以选择任意位置的1~3个硬币翻转一下,但是问你先手是否会输。
解题思路:
通过求sg发现规律
sg 1 2 4 7 8 11 13 14
x 0 1 2 3 4 5 6 7
找到规律,sg[x],如果x的二进制1的个数为奇数,sg[x]=2*x ,否则 sg[x]=2*x+1;
然后把各个Sg的值异或最终就是答案...
分类:
其他好文 时间:
2014-07-08 20:25:49
阅读次数:
149
推出了结论,万万没想到最后用搜索。。
还想dp来着。。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll long long
#define N 1000005
ll prime[N],primenum;//有primen...
分类:
其他好文 时间:
2014-07-08 17:26:17
阅读次数:
214
Hat's Fibonacci
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 6925 Accepted Submission(s): 2279
Problem Description
A Fibonacc...
分类:
其他好文 时间:
2014-07-08 14:00:45
阅读次数:
215
题意:N个点(0~n-1),M条无向边,问去掉2个点后最多的连通分块有多少。
先去掉一个点求出各个割点,并在dfs过程中求出去掉这个割点有多少个连通分块(将iscut[u]=true改为iscut[u]++),
这样子第二次就可以直接找出最多的连通分块了。
#include
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-07-08 13:06:23
阅读次数:
145
Problem Description
A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially...
分类:
其他好文 时间:
2014-07-08 11:10:23
阅读次数:
164
http://acm.hdu.edu.cn/showproblem.php?pid=2553
N皇后问题
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8077 Accepted Submission(s): 3603
...
分类:
其他好文 时间:
2014-07-08 10:57:58
阅读次数:
421