
贪心
文章平均质量分 77
974792789
不要在能吃苦的年纪追求安逸。
展开
-
ShellSort uva
关于list容器的使用。原创 2014-05-07 00:14:04 · 1372 阅读 · 0 评论 -
A. Dragons codeforces+贪心
A. Dragonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKirito is stuck on a level of the MMORPG he is playing now原创 2014-07-19 20:52:07 · 793 阅读 · 0 评论 -
Evil Straw Warts Live uva+回文串+贪心
Evil Straw Warts LiveA palindrome is a string of symbols that is equal to itself when reversed. Given an input string, not necessarily a palindrome, compute the number of swaps necessary to transfor原创 2014-07-18 20:16:31 · 728 阅读 · 0 评论 -
EDITOR NOTTOOBAD uva+贪心
EDITOR NOTTOOBAD Company Macrohard has released it’s new version of editor Nottoobad, which can understand a few voice commands. Unfortunately, there are only two voice commands that it can unde原创 2014-07-17 21:18:59 · 382 阅读 · 0 评论 -
Bit Mask uva+贪心
Bit MaskTime Limit1 SecondIn bit-wise expression, mask is a common term. You can get a certain bit-pattern using mask. For example, if you want to make first 4 bits of a 32原创 2014-07-17 21:01:39 · 515 阅读 · 0 评论 -
Wine trading in Gergovia uva+贪心
Wine trading in GergoviaAs you may know from the comic "Asterix and the Chieftain's Shield", Gergovia consists of one street, and every inhabitant of the city is a wine salesman. You wonder how th原创 2014-07-17 19:33:43 · 448 阅读 · 0 评论 -
Graph Construction uva+贪心+Havel-Hakimi定理
Graph ConstructionTime Limit2 SecondsGraph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different ways to repres原创 2014-07-17 23:01:03 · 623 阅读 · 0 评论 -
Add All +uva+贪心
Add AllInput: standard inputOutput: standard outputYup!! The problem name reflects your task; just add a set of numbers. But you may feel yourselves condescended, to write a C/C++ program ju原创 2014-07-17 08:54:22 · 567 阅读 · 0 评论 -
Copying Books +uva+二分+贪心
Copying Books Before the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so called scribers. The scriber had been gi原创 2014-07-17 08:59:45 · 564 阅读 · 0 评论 -
Ants
AntsAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ants meet原创 2014-07-17 08:44:53 · 778 阅读 · 0 评论 -
File Fragmentation+uva+贪心
File FragmentationThe ProblemYour friend, a biochemistry major, tripped while carrying a tray of computer files through the lab. All of the files fell to the ground and broke. Your friend picked u原创 2014-07-15 19:50:38 · 479 阅读 · 0 评论 -
Train Swapping
题目大意:给定一列乱序的车厢,相邻d原创 2014-04-26 10:48:43 · 589 阅读 · 0 评论 -
Graveyard
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2275原创 2014-04-25 18:06:50 · 643 阅读 · 0 评论 -
Nail Them+SPOJ+贪心算法
Nail ThemProblem code: QUEST5To get to the treasure, Jones must complete one more task. He comes across a table, where there are a number of wooden planks lying along the length原创 2014-08-15 17:30:19 · 559 阅读 · 0 评论