自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

c随遇er安的专栏

Luck is what happens when preparaton meets opportunity.

  • 博客(35)
  • 资源 (3)
  • 收藏
  • 关注

原创 [算法导论]动态规划---最长公共最序列问题

动态规划法经常会遇到复杂问题不能简单地分解成几个子问题,而会分解出一系列的子问题。简单地采用把大问题分解成子问题,并综合子问题的解导出大问题的解的方法,问题求解耗时会按问题规模呈幂级数增加。为了节约重复求相同子问题的时间,引入一个数组,不管它们是否对最终解有用,把所有子问题的解存于该数组中,这就是动态规划法所采用的基本方法。【问题】 求两字符序列的最长公共字

2013-05-20 23:07:44 1430

原创 UVaOJ10003 - Cutting Sticks

10003 - Cutting SticksTime limit: 3.000 secondsYou have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the l

2013-05-28 22:56:43 640

原创 UVaOJ108 - Maximum Sum

108 - Maximum SumTime limit: 3.000 secondsBackgroundA problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying

2013-05-25 18:14:17 480

原创 UVaOJ507 - Jill Rides Again

507 - Jill Rides AgainTime limit: 3.000 secondsJill likes to ride her bicycle, but since the pretty city of Greenhills where she lives has grown, Jill often uses the excellent public bus syste

2013-05-25 18:13:01 762

原创 UVaOJ11129 - An antiarithmetic permutation

11129 - An antiarithmetic permutationTime limit: 3.000 secondsA permutation of n+1 is a bijective function of the initial n+1 natural numbers: 0, 1, ... n. A permutation p is called antiarithm

2013-05-25 18:10:47 647

原创 UVaOJ10245 - The Closest Pair Problem

10245 - The Closest Pair ProblemTime limit: 3.000 seconds Given a set of points in a two dimensional space, you will have to find the distance between the closest two points. Input T

2013-05-25 18:09:24 530

原创 UVaOJ11100 - The Trip, 2007

Problem A: The Trip, 2007A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadel

2013-05-25 18:07:50 686

原创 UVaOJ10716 - Evil Straw Warts Live

Problem D: 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

2013-05-25 18:06:38 996

原创 UVaOJ10720 - Graph Construction

Problem CGraph ConstructionTime Limit2 SecondsGraph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different

2013-05-25 18:05:01 470

原创 UVaOJ10670 - Work Reduction

Problem C: Work ReductionPaperwork is beginning to pile up on your desk, and tensions at the workplace are starting to mount. Your boss has threatened to fire you if you don't make any progress by

2013-05-25 18:03:51 535

原创 UVaOJ10382 - Watering Grass

10382 - Watering GrassTime limit: 3.000 secondsn sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is installed at the horizontal center l

2013-05-25 18:01:51 605

原创 UVaOJ11054 - Wine trading in Gergovia

2006/2007 ACM International Collegiate Programming Contest University of Ulm Local ContestWine trading in GergoviaAs you may know from the comic "Asterix and the Chieftain's Shield", Gergovi

2013-05-25 18:00:19 509

原创 UVaOJ10718 - Bit Mask

Problem ABit 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

2013-05-25 17:59:11 639

原创 UVaOJ10400 - Game Show Math

10400 - Game Show MathTime limit: 20.000 secondsA game show in Britain has a segment where it gives its contestants a sequence of positive numbers and a target number. The contestant must make

2013-05-25 17:58:02 534

原创 UVaOJ10602 - Editor Nottoobad

10602 - Editor NottoobadTime limit: 3.000 secondsCompany Macrohard has released it’s new version of editor Nottoobad, which can understand a few voice commands. Unfortunately, there are only

2013-05-23 19:26:55 453

原创 UVaOJ10954 - Add All

10954 - Add AllTime limit: 3.000 secondsYup!! The problem name reflects your task; just add a set of numbers. But you may feel yourselves condescended, to write a C/C++ program just to add a s

2013-05-23 19:25:21 470

原创 UVaOJ10714 - Ants

Problem B: 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

2013-05-23 19:23:50 483

原创 UVaOJ10020 - Minimal coverage

10020 - Minimal coverageTime limit: 3.000 secondsThe ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such the

2013-05-23 19:22:06 489

原创 UVaOJ10026 - Shoemaker's Problem

10026 - Shoemaker's ProblemTime limit: 3.000 secondsShoemaker has N jobs (orders from customers) which he must make. Shoemaker can work on only one job in each day. For each ith job, it is kno

2013-05-23 19:20:57 609

原创 UVaOJ10700 - Camel trading

10700 - Camel tradingTime limit: 3.000 secondsBackground:Aroud 800 A.D., El Mamum, Calif of Baghdad was presented the formula 1+2*3*4+5, which had its origin in the financial accounts of a

2013-05-23 19:19:42 489

原创 UVaOJ10340 - All in All

10340 - All in AllTime limit: 3.000 secondsYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. B

2013-05-23 19:15:44 651

原创 UVaOJ10487 - Closest Sums

10487 - Closest SumsTime limit: 3.000 seconds Given is a set of integers and then a sequence of queries. A query gives you a number and asks to find a sum of two distinct numbers from the set,

2013-05-23 19:14:07 445

原创 UVaOJ10706 - Number Sequence

10706 - Number SequenceTime limit: 3.000 secondsA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groupsS1S2…Sk. Each

2013-05-23 19:12:47 454

原创 UVaOJ10057 - A mid-summer night's dream.

10057 - A mid-summer night's dream.Time limit: 30.000 seconds This is year 2200AD. Science has progressed a lot in two hundred years. Two hundred years is mentioned here because this problem

2013-05-23 19:11:21 619

原创 UVaOJ10341 - Solve It

10341 - Solve ItTime limit: 3.000 secondsSolve the equation:        p*e-x + q*sin(x) + r*cos(x) + s*tan(x) + t*x2 + u = 0        where 0 x InputInput consists of multiple test cases an

2013-05-23 19:10:05 419

原创 UVaOJ270 - Lining Up

270 - Lining UpTime limit: 3.000 seconds``How am I ever going to solve this problem?" said the pilot.Indeed, the pilot was not facing an easy task. She had to drop packages at specific poi

2013-05-23 19:08:14 734 1

原创 UVaOJ10132 - File Fragmentation

10132 - File FragmentationTime limit: 3.000 secondsYour friend, a biochemistry major, tripped while carrying a tray of computer files through the lab. All of the files fell to the ground and b

2013-05-23 19:06:43 667

原创 UVaOJ10763 - Foreign Exchange

10763 - Foreign ExchangeTime limit: 3.000 secondsYour non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinates a very successful foreign student exchan

2013-05-23 19:05:04 674 1

原创 UVaOJ10905 - Children's Game

4th IIUC Inter-University Programming Contest, 2005AChildren’s GameInput: standard inputOutput: standard outputProblemsetter: Md. KamruzzamanThere are

2013-05-23 19:03:31 542

原创 UVaOJ11218 - KTV

11218 - KTVTime limit: 3.000 secondsOne song is extremely popular recently, so you and your friends decided to sing it in KTV. The song has 3 characters, so exactly 3 people should sing together

2013-05-23 19:01:29 710

原创 UVaOJ674 - Coin Change

674 - Coin ChangeTime limit: 3.000 secondsSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of mone

2013-05-23 18:58:35 524

原创 UVaOJ10405 - Longest Common Subsequence

10405 - Longest Common SubsequenceTime limit: 3.000 secondsSequence 1:                Sequence 2:                Given two sequences of characters, print the length of the longest co

2013-05-23 18:52:01 537

原创 UVaOJ103 - Stacking Boxes

103 - Stacking BoxesTime limit: 3.000 secondsBackgroundSome concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when extended to arbitr

2013-05-23 18:47:17 640

原创 UVaOJ111 - History Grading

111 - History GradingTime limit: 3.000 secondsBackgroundMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which studen

2013-05-23 18:43:17 633

转载 Havel-Hakimi定理

转载自:http://blog.csdn.net/shuangde800/article/details/7857246Havel定理描述给定一个非负整数序列{d1,d2,...dn},若存在一个无向图使得图中各点的度与此序列一一对应,则称此序列可图化。进一步,若图为简单图,则称此序列可简单图化。可图化的判定比较简单:d1+d2+...dn=0(mod2)。关于具体图的构造,我

2013-05-15 15:37:15 592

OpenGL 超级宝典(第五版)源代码

OpenGL 超级宝典(第五版)源代码,从作者主页下载,并分离出C++源代码。

2012-12-05

OpenGL超级宝典(第五版) C++源代码

OpenGL超级宝典(第五版) C++源代码。 从作者主页下载,分离出了C++源文件,供大家分享

2012-12-05

基于MFC和VFW的简单拍照程序

在WIN7下使用VC++6.0,基于VFW编写的一个简单拍照程序,代码简洁易懂,适合初学者。

2012-10-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除