随笔分类 - 记忆化搜索
摘要:题目链接:http://codeforces.com/contest/283/problem/B思路: dp[now][flag]表示现在在位置now,flag表示是接下来要做的步骤,然后根据题意记忆化搜索记忆,vis数组标记那些已经访问过的状态。#include #include #include...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4826思路:dp[x][y][d]表示从方向到达点(x,y)所能得到的最大值,然后就是记忆化了。#include #include #include #include #define REP(i, a, ...
阅读全文

浙公网安备 33010602011771号