UVa167 - The Sultan's Successors
題目地址:點擊打開鏈接 就是八皇後問題 #include #include #include max_sum) max_sum=sum; r
Timus 1025. Democracy in Danger 題解
Background In one of the countries of Caribbean basin all decisions were a
UVa 11019 Matrix Matcher 字符矩陣出現次數
題目來源:UVa 11019 Matrix Matcher 題意:輸入2個字符矩陣 求第二個字符矩陣在第一個字符矩陣中出現的次數 思路:見大白書218頁
HDU 2857 Mirror and Light (計算幾何求 對稱點和兩直線的交點)
題意:給你鏡子的位置(用兩點確定的一條直線表示),光源,光的反射點,求光在鏡子的折射點 計算幾何的模板,注意斜率!!! 模板1: #in
Recover Binary Search Tree -- LeetCode
這道題是要求恢復一顆有兩個元素調換錯了的二叉查找樹。一開始拿到可能會覺得比較復雜,其實觀察出規律了就比較簡單。主要還是利用二叉查找樹的主要性
Timus 1935. Tears of Drowned 詳解
Old Captain Jack Sparrow’s friend Tia Dalma, the fortuneteller and prophete
Timus 1723. Sandro's Book 題解
Its been quite a number of years since Lich Sandro retired. Sometimes in th