原创 ACM動態規劃總結 dp

轉載請註明出處,謝謝。   http://blog.csdn.net/cc_again?viewmode=list          ----------  Accagain  2014年5月15日 動態規劃一直是ACM競賽中的重點,

原创 poj 1236 Network of Schools 強連通

我的第一個強連通題目,利用這個題目入門。花了一晚上學習了啥是強連通和tarjan算法求強連通分量。感覺這個題只要理解了這個就可以做了,比較適合入門。 如果還不會的,可以先了解一下再看題。 A number of schools are c

原创 UVA 351 Network 無向圖求割點

裸的無向圖求割點。自己的第一個求割點題目#include<iostream> #include<algorithm> #include<cstring> #include<queue> #define l

原创 FatMouse and Cheese 【dp思想的dfs】

                            emmmmm 遞歸的dp? 就是在搜索的時候像dp一樣找到最優子狀態並儲存。 題目: FatMouse has stored some cheese in a city. The c

原创 免費餡餅 dp

題目描述 都說天上不會掉餡餅,但有一天gameboy正走在回家的小徑上,忽然天上掉下大把大把的餡餅。說來gameboy的人品實在是太好了,這餡餅別處都不掉,就掉落在他身旁的10米範圍內。餡餅如果掉在了地上當然就不能吃了,所以gameboy

原创 Monkey and Banana dp

A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana

原创 poj 3256 Wormholes 最短路Floyd

裸的Floyd,單純三重循環,比較好理解 有負權邊,一起處理即可。 #include<iostream> #include<algorithm> #include<cstring> #include<queue> #define ll l

原创 poj3984迷宮問題 bfs

定義一個二維數組: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,

原创 poj-2387 Til the Cows Come Home dijkstra

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before F

原创 Common Subsequence dp

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. G

原创 Dungeon Master bfs

You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit