LeetCode之Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the numbe
HDU 1711 Number Sequence KMP入門
點擊打開鏈接 Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Li
[ACM] hdu 1342 Lotto (排列)
Lotto Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (
hdu 3435 A new Graph Game(最小費用最大流)
題意: 一個無向圖(or 有向圖), 每一個點都必須屬於一個圈, 並且只能屬於一個圈, 求滿足要求的最小費用。 比如: 1 2 5 2 3
UVA 11400 Lighting System Design(貪心+DP)
Problem F Lighting System Design Input: Standard Input Output: Standard Outp
HDU1561The more, The Better (樹形DP)
Problem Description ACboy很喜歡玩一種戰略游戲,在一個地圖上,有N座城堡,每座城堡都有一定的寶物,在每次游戲中ACboy允許攻克M
LeetCode之Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth. The minimum depth is the numbe
HDU1595(枚舉+最短路(dijkstra))
題意不多說了。。思路就是先走一遍dijkstra,然後p數組記錄下路徑,然後枚舉路徑上的邊刪去之後走dijkstra得到的最短路(想想為什麼?我當時做的時
LeetCode之Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path
uva - 10602 - Editor Nottoobad(貪心)
題意:給你幾個單詞,第一個單詞必須手動打印,後邊的單詞可以通過“重復最後一個單詞”“刪除最後的字母”(當然也可以打印)轉換得到,求最小的操作次數。 方法:
LeetCode | Spiral Matrix
題目 Given a matrix of m x n elements (m rows, n columns), return all element