Digit Sum
Time Limit: 2000ms, Special Time Limit:5000ms,
Memory Limit:65536KB
Total submit users: 69, Accepted users:
61
Problem 12944 : No special judgement
Problem description
...
分类:
其他好文 时间:
2014-08-30 20:29:30
阅读次数:
245
#include
#include
#include
#include
using namespace std;
const int N = 25;
char map[N][N];
int vis[N][N][1<<11];
struct Node
{
int x,y,step;
int key;
};
int dx[6]={0,0,1,-1};
int dy[6]={1,-...
分类:
其他好文 时间:
2014-08-30 12:39:39
阅读次数:
196
B -炮兵阵地Time Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M...
分类:
其他好文 时间:
2014-08-30 11:08:19
阅读次数:
576
There is a fire in LTR ’ s home again. The fire can destroy all the things in
t seconds, so LTR has to escape in t seconds. But there are some jewels in LTR ’ s rooms, LTR love jewels very much so h...
分类:
其他好文 时间:
2014-08-29 22:45:58
阅读次数:
308
炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:19397Accepted:7479Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表...
分类:
其他好文 时间:
2014-08-28 12:56:59
阅读次数:
225
1500. Pass LicensesTime limit: 2.5 secondMemory limit: 64 MBA New Russian Kolyan believes that to spend his time in traffic jams is below his dignity....
分类:
其他好文 时间:
2014-08-28 11:01:19
阅读次数:
303
Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:7798Accepted:4159DescriptionFarmer John has purchased a lush new rectangular pasture ...
分类:
其他好文 时间:
2014-08-26 22:39:36
阅读次数:
236
方格取数(1)
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5530 Accepted Submission(s): 2094
Problem Description
给你一个n*n的格子的棋盘,每个格子里面有...
分类:
其他好文 时间:
2014-08-26 19:41:46
阅读次数:
154
给出数n和m,求n的所有排列中,模m得0的有多少个 n
(1?≤?n?18) and
m (1?≤?m?≤?100).
暴力法我们直接枚举n的所有排列,显然18!超时。
考虑怎么dp
假设给了我们数n=23765
显然有
(237%m*10+6)%m=2376%m
(367%m*10+2)%m=3672
我们很自然的想到了
这样的状态转移
dp[i][k]
i代表取...
分类:
其他好文 时间:
2014-08-26 15:38:36
阅读次数:
216
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3001
题意:还是环游地图的问题,只不过这回旅行者对自己有着严格的要求,地图上每个点的经过次数不能超过两次。
思路:依然是状压DP问题,根上一道很像,只不过这次对于每个点来说有三种状态,分别是未经过,经过一次,经过两次。所以要用三进制的数来进行状态压缩,这个关键点想明白了其他的和上一道基本一样了。对于我...
分类:
其他好文 时间:
2014-08-25 22:56:45
阅读次数:
202