poj 2110 Mountain Walking 枚舉+bfs
題意:給一個n*n的矩陣,要從左上角走到右下角,使經過數字的最大數與最小數的差最小。分析:一開始想到了二分這個差,然後判斷是否存在路徑,每次只知道差的話深搜每次
UVA 662 Fast Food(DP)
The fastfood chain McBurger owns several restaurants along a highway. Recently,
[LeetCode] House Robber II
House Robber IINote: This is an extension of House Robber.After robbing th
hdu 3038 How Many Answers Are Wrong
#include #include #include #include #include #include #include #include #include
[LeetCode][Java] Unique Paths
題目: A robot is located at the top-left corner of a m x n grid (marked '
POJ 題目1106 Transmitters(數學幾何)
Transmitters Time Limit: 1000MS Memory Limit: 10000K Total Submissions
UVALive 3523Knights of the Round Table(二分圖+雙連通分量)
DescriptionBeing a knight is a very attractive career: searching for the Holy Gr
hdu1010 Tempter of the Bone(dfs+奇偶剪枝)
第二次做這個題目了,結果沒仔細讀題,直接就BFS了, 原來是求是否恰好在T 秒逃出迷宮, 而不是T秒內;上次做是在剛學習搜索的時候,看樣子印象還是不