原创 HDU 6073 Matching In Multiplication

Matching In Multiplication Problem Description In the mathematical discipline of graph theory, a bipartite graph is

原创 HDU 6064 RXD and numbers BEST theorem

RXD and numbers Problem Description RXD has a sequence A1,A2,A3,…An, which possesses the following properties

原创 To Add or Not to Add CodeForces - 231C

C. To Add or Not to Add time limit per test 2 seconds memory limit per test 256 megabytes input standard in

原创 計算幾何之叉乘和極角排序

迫於隊伍需要,蒻最近幾天一直在刷計算幾何的入門,做了兩天,10道題,對叉乘的使用有了一定的瞭解,當初爲了叉乘的知識點,可是找了很多的資料,但一直沒有自己滿意的,現在有點總結,希望各位菊苣能夠給予指點。 首先,向量的兩種運算,叉乘和點乘,例

原创 歐拉函數

原創網址:http://www.cnblogs.com/handsomecui/p/4755455.html 歐拉函數                                      算法總結  一歐拉函數(Eule

原创 POJ_2488: A Knight's Journey

POJ_2488: A Knight's Journey Description BackgroundThe knight is getting bored of seeing the same black and white s

原创 POJ 2823 Sliding Window

Sliding Window Time Limit: 12000MS   Memory Limit: 65536K Total Submissions: 53791   Accepted: 15431 Case Time Limit:

原创 HDU 1010 Tempter of the Bone

Tempter of the Bone Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. Howe

原创 HDU 2553 N皇后問題

  N皇后問題 Problem Description 在N*N的方格棋盤放置了N個皇后,使得它們不相互攻擊(即任意2個皇后不允許處在同一排,同一列,也不允許處在與棋盤邊框成45角的斜線上。 你的任務是,對於給定的N,求出有多少種合

原创 HDU 1258 Sum It Up

Sum It Up Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbe

原创 歐幾里德與擴展歐幾里德算法

原創網址爲:http://http://www.cnblogs.com/frog112111/archive/2012/08/19/2646012.html 歐幾里德算法------jumping_frog 歐幾里德算法又稱輾轉相除法

原创 網絡流最大流EK和Dinic入門算法

網絡流基礎入門,這裏不說那些證明過程了,直接個人見解。 首先:最大流,顧名思義,是從源點出發,經過若干條路徑,最後到達匯點的所有流的和。而這裏最大流的確定條件是,當前的網絡中不存在增廣路了。那什麼是增廣路呢?就是當進行若干次操作後,當前網

原创 POJ 3984 迷宮問題

 迷宮問題 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15397   Accepted: 9144 Description 定義一個二維數組: in

原创 HDU 6141 ( I am your Father! ) (最小樹形圖+權值編碼)

I am your Father! Problem Description > Darth Vader: "Obi-Wan never told you what happened to your father." > > Luke

原创 HDU 1848 Fibonacci again and again

Fibonacci again and again Problem Description 任何一個大學生對菲波那契數列(Fibonacci numbers)應該都不會陌生,它是這樣定義的: F(1)=1; F(2)=2; F(n)