[LeetCode] Basic Calculator II
Basic Calculator IIImplement a basic calculator to evaluate a simple expression
UVA 11134 Fabled Rooks 優先隊列
題意:有一個NxN的棋盤,你需要在上面放N個車,它們互相之間不能攻擊到,並且每個車只能放在指定的矩形范圍裡面。 思路:首先車之間不能互相攻擊,那麼每行
POJ2029:Get Many Persimmon Trees(二維樹狀數組)
DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School i
LeetCode77:Combinations
Given two integers n and k, return all possible combinations of k numbers out of
poj 3537Crosses and Crosses 博弈論之grundy值
題意:給1*n的格子,輪流在上面叉叉,最先畫得3個連續叉叉的贏,問先手必勝還是必敗。分析:求狀態的grundy值(也就是sg值),具體怎麼求詳見代碼,為什麼這麼
LeetCode226:Invert Binary Tree
nvert a binary tree. 4/ \2 7/ \ / \1 3 6 9to4/ \7 2/ \ / \9 6 3 1Trivia:This pro
LeetCode64:Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left t
[LeetCode]91.Decode Ways
題目A message containing letters from A-Z is being encoded to numbers using the fo
zoj3471 Most Powerful
Recently, researchers on Mars have discovered N powerful atoms. All of them are
HDU 1533 Going Home(最小費用流)
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (J