原创 Multiplying by Rotation——進制循環節

  Multiplying by Rotation  Warning: Not all numbers in this problem are decimal numbers! Multiplication of natu

原创 Just the Facts——階乘計算

  Just the Facts  The expression N!, read as `` N factorial," denotes the product of the first N positive integers

原创 Tree——二叉樹中序後序建樹,先序遍歷

  Tree  You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path

原创 1月22號總結

今天真的好累呀,連續熬了兩天的夜,今天眼睛就很疼,看來我真的不適合熬夜。。。。。。。 因爲狀態不好,實驗室網也渣的要死,一天做了4道題目,都是小白書第四套訓練裏的。  上午的兩道題目都和進制有關係,第一道就是簡單的進制轉換,第二道題目藉

原创 Parentheses Balance——括號匹配

  Parentheses Balance  You are given a string consisting of parentheses () and []. A string of this type is said to

原创 Bicoloring——交叉染色

  Bicoloring  In 1976 the ``Four Color Map Theorem" was proven with the assistance of a computer. This theorem state

原创 1月27~28號總結

這兩天真的是渾渾噩噩的,感覺自己都不知道在做些什麼,寫這篇文章的時候,真的是好愧疚。 27號這天,主要是看了圖論這本書,沒怎麼敲題。DFS和BFS在之前寫了總結,也做了一些題目,今天又看了關於活動網絡的問題,雖然數據結構上也曾經學過,但

原创 因式分解總結

因式分解其實是一個很簡單的應用,這裏做一下小小的總結 計算一個數的所有因子:這裏只需要找到這個數的平方根的因子,然後再用該數分別除以每個因子,就會找到每個因子對應的另一個因子 int a[10000],num = 0;//存儲n的因子

原创 Oil Deposits——在圖中找油田

  Oil Deposits  The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoS

原创 1月29號總結

今天學習的是最小生成樹,之所以複習這個算法,是因爲在POJ做到了一道題目,因爲是稠密圖,所以用Prim算法,但是之前都是直接套模板,所以我決定這次自己手敲,於是就去複習了最小生成樹的Prim算法。 看了一遍《圖論算法理論,實現及應用》之後

原创 Birthday Cake——直線分割

 Problem G. Birthday Cake  Background Lucy and Lily are twins. Today is their birthday. Mother buys a birthday

原创 Truck History(汽車的歷史)——最小生成樹

Truck History Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 19499   Accepted: 7519 Description Advan

原创 Amr and Pins——圓的旋轉

 Amr and Pins time limit per test 1 second memory limit per test 256 megabytes input standard input output s

原创 S-Trees——根據路徑求葉子節點

  S-Trees  A Strange Tree (S-tree) over the variable set  is a binary tree representing a Boolean function . Each

原创 Uniform Generator——求餘

 Uniform Generator  Computer simulations often require random numbers. One way to generate pseudo-random numbers is