hdu 1208
摘要:
地址:http://acm.hdu.edu.cn/showproblem.php?pid=1208题意:走迷宫,每个格子里面数字代表与下一个格子间隔是几,求有多少种走法到n。mark:记忆化搜索。本来觉得直接暴力搜索可过,结果tle了。dp[i][j]存放该格子有多少总走法。代码:#include <stdio.h>#include <string.h>#include <stdlib.h>int n;char a[40][40];int s[40][40];long long dp[40][40];int tab[2][2] = {1, 0, 0, 1}; 阅读全文
posted @ 2012-08-19 20:06 andre_joy 阅读(238) 评论(0) 推荐(0) 编辑