原创 POJ1125(FLoyed)

POJ1125 Stockbroker Grapevine Description Stockbrokers are known to overreact to rumours. You have been contracted

原创 POJ1062(Dijkstra)

POJ1062 昂貴的聘禮 Description 年輕的探險家來到了一個印第安部落裏。在那裏他和酋長的女兒相愛了,於是便向酋長去求親。酋長要他用10000個金幣作爲聘禮才答應把女兒嫁給他。探險家拿不出這麼多金幣,便請求酋長降低

原创 設計模式_建造者模式

設計模式_建造者模式 問題 ​ 一個複雜對象的創建,各部分可以靈活選擇,步驟大同小異。以往的創建過程如下: AbstractHouse.java public abstract class AbstractHouse { pub

原创 POJ3194(DFS)

POJ3194(DFS) Equidivisions Description An equidivision of an n × n square array of cells is a partition of the n2

原创 POJ1111(DFS)

POJ1111(DFS) Image Perimeters Description Technicians in a pathology lab analyze digitized images of slides. Objec

原创 POJ1979(DFS)

POJ1979(DFS) Red and Black Description There is a rectangular room, covered with square tiles. Each tile is colore

原创 POJ2251(BFS)

POJ2251(BFS) Dungeon Master Description You are trapped in a 3D dungeon and need to find the quickest way out! The

原创 算法_圖

圖 圖由頂點的集合和邊的集合組成。表示一些事物或者狀態的表達方法。 頂點表示對象。邊表示兩個對象間的關係。 分類 ​ 一個圖的頂點對是有序的, 則可以稱之爲有向圖。在對有向圖中的頂點對排序後, 便可以在兩 個頂點之間繪製一

原创 POJ1753(DFS)

POJ1753(DFS) Flip Game Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on

原创 POJ1562(DFS)

POJ1562(DFS) Oil Deposits Description The GeoSurvComp geologic survey company is responsible for detecting undergr

原创 POJ2386(DFS)

POJ2386(DFS) Lake Counting Description Due to recent rains, water has pooled in various places in Farmer John’s fi

原创 POJ3984(BFS)

POJ3984(BFS) 迷宮問題 Description 定義一個二維數組: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,

原创 POJ1426(BFS)

POJ1426(BFS) Find The Multiple Description Given a positive integer n, write a program to find out a nonzero multi

原创 POJ3414(BFS)

POJ3414(BFS) Pots Description You are given two pots, having the volume of A and B liters respectively. The follow

原创 PO3069(貪心)

POJ3069(貪心) Saruman’s Army Description Saruman the White must lead his army along a straight path from Isengard to