最短路+记忆化搜索HDU 1142 A Walk Through the Forest链接:http://acm.hdu.edu.cn/showproblem.php?pid=1142 > 题意:找出不同的路径条数,假如jimmy要从A走到B的话满足jimmy从B到家的距离比从A到家的距离短> 这样我们可以通过最短路算法,找出从家(看成源点)到各个点的最短路径长度,记做D[v]. 然后就可以从起点(office) > dfs,首先从某点i到某点j走得通,然后满足D[j]<D[j],…
A Walk Through the Forest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10172 Accepted Submission(s): 3701 Problem Description Jimmy experiences a lot of stress at work these days, especial…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1428 漫步校园 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description LL最近沉迷于AC不能自拔,每天寝室.机房两点一线.由于长时间坐在电脑边,缺乏运动.他决定充分利用每次从寝室到机房的时间,在校园里散散步.整个HDU校园呈方形布局,可划分为n*n…
A Walk Through the Forest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7995 Accepted Submission(s): 2943 Problem Description Jimmy experiences a lot of stress at work these days, especiall…
Problem UVA - 10917 - Walk Through the Forest Time Limit: 3000 mSec Problem Description Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to walk home. To…
Tunnels Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 844 Accepted Submission(s): 249 Problem Description Bob is travelling in Xi’an. He finds many secret tunnels beneath the city. In his…