原创 LightOJ - 1019 Brush (V)

Description Tanvir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dust

原创 LightOJ - ???? 最短修復路線(最小生成樹)

Description There are several cities in the country, and some of them are connected by bidirectional roads. Unfortun

原创 LightOJ - 1040 Donation

Description A local charity is trying to gather donations of Ethernet cable. You realize that you probably have a lo

原创 UVA - 10382 Watering Grass(貪心)

DescriptionProblem E Watering Grass Input: standard input Output: standard output Time Limit: 3 seconds n sprinklers

原创 HDU-1016 Prime Ring Problem

Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle sep

原创 HDU - 1495 非常可樂(倒水問題BFS)

Description 大家一定覺的運動以後喝可樂是一件很愜意的事情,但是seeyou卻不這麼認爲。因爲每次當seeyou買了可樂以後,阿牛就要求和seeyou一起分享這一瓶可樂,而且一定要喝的和seeyou一樣多。但seeyou

原创 HDU - 1010 Tempter of the Bone

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

原创 UVA - 1368 DNA Consensus String

 Figure 1. DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four dif

原创 UVA-11624 Fire!

Description Jane is one of the most talented young programmers as well as an astrophysicist. Recently she discovered

原创 最短路四種算法

題意,赤果果的最短路 想當年傻傻地用floyd和dijkstra亂刷過,最近好好理解了一下最短路,今天用四種算法實現了一遍。 以後可以當模板用。 代碼: floyd [cpp] view plainco

原创 POJ - 1007

Description One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order w

原创 LightOJ - 1088 Points in Segments

Description Given n points (1 dimensional) and q segments, you have to find the number of points that lie in each of

原创 UVA - 1587 Box

Ivan works at a factory that produces heavy machinery. He has a simple job -- he knocks up wooden boxes of different si

原创 LightOJ - 1001 Opposite Task

Description This problem gives you a flavor the concept of special judge. That means the judge is smart enough to ver

原创 UVA - 1588 Kickdown

A research laboratory of a world-leading automobile company has received an order to create a special transmission mec