原创 POJ1505 貪心+二分優化

題目描述 Before the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be r

原创 hdu2577一道很不錯的DP

題目描述 Pirates have finished developing the typing software. He called Cathy to test his typing software. She is good

原创 [poj1161]平面圖縮點

題目大意 In a country, great walls have been built in such a way that every great wall connects exactly two towns. The

原创 [2-sat]構造一個可行解(poj3648)

2-sat問題的可行解 當我們確定了存在一個可行解的時候,下面的工作往往是要構造一個可行解,那麼,如何來構造這樣的解呢? 我們知道,當我們選擇了一個強連通分量中的一個點的時候,所有的點都會被選擇,所以,此時,我們將強連通分量縮點

原创 poj1466最大二分圖匹配

題目描述 In the second year of the university somebody started a study on the romantic relations between the students.

原创 POJ2151正難則反

題目描述 Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer

原创 [hdu5492]揹包問題的擴展

題目描述 Frog fell into a maze. This maze is a rectangle containing N rows and M columns. Each grid in this maze contai

原创 hdu5045狀態壓縮DP

題目描述 In the ACM International Collegiate Programming Contest, each team consist of three students. And the teams ar

原创 hdu4722數位DP

題目描述 If we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good

原创 [poj1639]度限制生成樹

Problem Description The Contortion Brothers are a famous set of circus clowns, known worldwide for their incredible

原创 2016年暑假總結

這麼快,大二的暑假就結束了,我也是一個大三的學生了。感覺什麼都不會,兩年就過去了。想要在這裏總結一下過去的生活。 整個暑假,先看了一些項目管理的內容,然後就是刷ACM題,每天早上八點去實驗室,晚上九點多回去的生活,枯燥,卻又

原创 poj2455二分構圖網絡流

題目描述 Farmer John is constructing a new milking machine and wishes to keep it secret as long as possible. He has hid

原创 hdu5000一道很有意思的DP

題目描述 After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power

原创 [2-sat]動態的2-sat問題(hdu3622)

概述 在一些最優化的問題當中,我們不知道一些指標的最優值是多少,而這個指標又在影響我們的邏輯表達式,我覺得這樣的問題是一種動態的2-sat問題。通常,我們使用搜索,不斷的重複建圖,最後達到解題的目標。 一個例題 這是ACM亞洲區比

原创 hdu4901-DP注意精度

題目約束 There is an old country and the king fell in love with a devil. The devil always asks the king to do some craz