原创 錢幣兌換問題 HDU - 1284

Problem Description 在一個國家僅有1分,2分,3分硬幣,將錢N兌換成硬幣有很多種兌法。請你編程序計算出共有多少種兌法。 Input 每行只有一個正整數N,N小於32768。 Output 對應每個輸

原创 Triangle HDU - 5914 (斐波那契數列的應用1123)

Mr. Frog has n sticks, whose lengths are 1,2, 3⋯⋯n respectively. Wallice is a bad man, so he does not want Mr. Frog t

原创 Coach CodeForces - 300B

A programming coach has n students to teach. We know that n is divisible by 3. Let's assume that all students are numb

原创 The Meeting Place Cannot Be Changed CodeForces - 782B (二分時間)

The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in mete

原创 Connect them ZOJ - 3204 (最小生成樹)

You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All c

原创 Coprime Sequence HDU - 6025

Do you know what is called ``Coprime Sequence''? That is a sequence consists of nnpositive integers, and the GCD (Gre

原创 Tempter of the Bone HDU - 1010 (奇偶性剪枝)

The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began

原创 Queue CodeForces - 141C

In the Main Berland Bank n people stand in a queue at the cashier, everyone knows his/her height hi, and the heights o

原创 樹的最大獨立集 poj 2342

題目描述  Ural大學有N個職員,編號爲1~N。他們有從屬關係,也就是說他們的關係就像一棵以校長爲根的樹,父結點就是子結點的直接上司。每個職員有一個快樂指數。現在有個週年慶宴會,要求與會職員的快樂指數最大。但是,沒有職員願和直接上司一

原创 Codeforces Round #245 (Div. 1) -- B. Working out (DP)

Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym wh

原创 Cleaning Shifts POJ - 2376

Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always w

原创 New Year and Old Property CodeForces - 611B

The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed

原创 Gym Class HDU - 5695

衆所周知,度度熊喜歡各類體育活動。  今天,它終於當上了夢寐以求的體育課老師。第一次課上,它發現一個有趣的事情。在上課之前,所有同學要排成一列, 假設最開始每個人有一個唯一的ID,從1到NN,在排好隊之後,每個同學會找出包括自己在內的前

原创 The Frog's Games HDU - 4004 (二分)

The annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Iron

原创 Connections in Galaxy War ZOJ - 3261

In order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels