POJ1088 滑雪:http://poj.org/problem?id=1088
Tags: mDFS(记忆化搜索)
Code:
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 110;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
int h[maxn][maxn];
int dp[maxn][maxn];
int R, C;
int DP(int x, int y)
{
int i, xx, yy;
if(dp[x][y]!=-1) return dp[x][y];
int ans = 0;
for(i=0; i<4; i++) {
xx = x+dx[i];
yy = y+dy[i......
阅读全文