這是第一章的所有例題和課后習題,寒假前的任務,盡量刷吧。。。
問題求解策略
例題
例題 1 | UVa11292 | The Dragon of Loowater | 排序后用貪心法 |
例題 2 | UVa11729 | Commando War | 用貪心法求最優排列;用“相鄰交換法”證明正確性 |
例題 3 | UVa11300 | Spreading The Wealth | 用代數法進行數學推導;中位數 |
例題 4 | LA3708 | Graveyard | 推理;參考系 |
例題 5 | UVa10881 | Piotr's Ants | 等效變換;排序 |
例題 6 | LA2995 | Image is Everything | 三維坐標系;迭代更新 |
例題 7 | UVa11464 | Even Party | 部分枚舉;遞推 |
例題 8 | LA3401 | Colored Cubes | 部分枚舉;貪心 |
例題 9 | UVa11210 | Chinese Mahjong | 回溯法;以中國麻將為背景 |
例題 10 | UVa11384 | Help is needed for Dexter | 問題轉化;遞歸 |
例題 11 | UVa10795 | A Different Task | 漢諾塔問題;遞歸 |
例題 12 | LA3971 | Assemble | 二分法;貪心 |
例題 13 | LA3635 | Pie | 二分法 |
例題 14 | UVa11520 | Fill the Square | 求字典序最小的解;貪心 |
例題 15 | LA3902 | Network | 樹上的最優化問題;貪心 |
例題 16 | LA3177 | Beijing Guards | 二分法;貪心 |
習題
UVa11636 | Hello World! | ||
UVa11039 | Building Designing | ||
LA3213 | Ancient Cipher | ||
LA3602 | DNA Consensus String | ||
UVa10970 | Big Chocolate | 不需要動態規划 | |
UVa10340 | All in All | ||
UVa10382 | Watering Grass | 經典模型;貪心 | |
UVa10905 | Children's Game | 貪心。容易想錯!建議編程並提交 | 題解1 |
LA4254 | Processor | 二分法 | |
UVa11627 | Slalom | 二分法 | |
UVa11134 | Fabled Rooks | 經典問題的變形 | |
UVa11100 | The Trip, 2007 | ||
LA4725 | Airport | ||
LA4850 | Installations | ||
LA3266 | Tian Ji - The Horse Racing | 有多種方法 | |
UVa11389 | The Bus Driver Problem | 有多種方法 | |
LA4094 | Wonder Team | ||
LA3303 | Songs | 相鄰交換法 | |
LA2757 | Supermarket | 經典問題 | |
LA3507 | Keep the Customer Satisfied | 經典問題的變形 | |
LA4234 | Ugly Windows | 注意細節 | |
LA4238 | Priest John's Busiest Day | 認真分析題目 | |
LA4636 | Cubist Artwork | 有趣的題目;邏輯推理 | |
LA4253 | Archery | 枚舉。注意特殊情況和精度 | |
LA3667 | Ruler | 搜索 | |
LA5693 | Compress the String | 搜索。需要優化 | |
LA5704 | Yummy Triangular Pizza | 回溯法。https://oeis.org/A006534 | |
UVa10825 | Anagram andMultiplication | 枚舉(需要猜想) | |
UVa10639 | Square Puzzle | 回溯法。注意細節 | |
LA3403 | Mobile Computing | 枚舉二叉樹 | |
LA3406 | Bingo | 注意枚舉方式 | |
LA3621 | Power Calculation | 經典的搜索題目;注意優化 | |
LA2108 | Houses Divided | 搜索;需要優化 | |
LA5842 | Equipment | 需認真分析題目 | |
LA5844 | Leet | 以“火星文”為背景的題目 | |
LA4644 | Hobby on Rails | 比較繁瑣的搜索題目 |
高效算法設計
例題
例題 17 | UVa11462 | Age Sort | 排序后用貪心法 |
例題 18 | UVa11078 | Open Credit System | 掃描、維護最大值 |
例題 19 | UVa11549 | Calculator Conundrum | Floyd判圈算法 |
例題 20 | LA3905 | Meteor | 線性掃描;事件點處理 |
例題 21 | LA2678 | Subsequence | 線性掃描;前綴和;單調性 |
例題 22 | LA3029 | City Game | 遞推;掃描法 |
例題 23 | LA3695 | Distant Galaxy | 枚舉;線性掃描 |
例題 24 | UVa10755 | Garbage heap | 前綴和、降維、遞推 |
例題 25 | LA2965 | Jurassic Remains | 中途相遇法 |
習題
LA2963 | Hypertransmission | 掃描;維護信息 | |
UVa10827 | Maximum sum on a torus | 前綴和;降維 | |
UVa10125 | Sumsets | 中途相遇法 | |
UVa10763 | Foreign Exchange | 快速檢索 | |
UVa10391 | Compound Words | 字符串檢索;哈希表 | |
UVa11054 | Wine trading in Gergovia | 掃描法 | |
LA4726 | Average | 樹形結合或者單調隊列 | |
LA4851 | Restaurant | ||
LA4950 | Selling Land | ||
LA4356 | Fire-Control System | 掃描法 | |
LA2689 | Cricket Field | 在W*H網格里找一個最大空正方形 | |
LA5052 | Genome Evolution | ||
LA3716 | DNA Regions | 利用數學變形或者數形結合 | |
LA4629 | Knowledge for the masses | ||
LA4621 | Cav | ||
LA3693 | Balancing the Scale | 用空間換時間 | 題解1 |
LA4294 | Shuffle | 有多種方法 | |
LA5848 | Soju | ||
LA4062 | You are around me ... |