- 博客(119)
- 资源 (3)
- 收藏
- 关注
原创 [算法导论]动态规划---最长公共最序列问题
动态规划法经常会遇到复杂问题不能简单地分解成几个子问题,而会分解出一系列的子问题。简单地采用把大问题分解成子问题,并综合子问题的解导出大问题的解的方法,问题求解耗时会按问题规模呈幂级数增加。为了节约重复求相同子问题的时间,引入一个数组,不管它们是否对最终解有用,把所有子问题的解存于该数组中,这就是动态规划法所采用的基本方法。【问题】 求两字符序列的最长公共字
2013-05-20 23:07:44 1489
原创 UVaOJ10820 - Send a Table
Problem ASend a TableInput: Standard InputOutput: Standard Output When participating in programming contests, you sometimes face the following problem: You know how to calcutale the output f
2013-07-21 14:31:39 717
原创 UVaOJ10717 - Mint
Problem E: MintThe Royal Canadian Mint has commissioned a new series of designer coffee tables, with legs that are constructed from stacks of coins. Each table has four legs, each of which uses a di
2013-07-21 14:27:06 883
原创 UVaOJ10791 - Minimum Sum LCM
10791 - Minimum Sum LCMTime limit: 3.000 secondsLCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all integers of that set. It is interestin
2013-07-17 10:52:10 646
转载 UVaOJ11121 - Base -2
11121 - Base -2Time limit: 3.000 seconds The creator of the universe works in mysterious ways. Buthe uses a base ten counting system and likes round numbers.Scott A
2013-07-07 16:25:19 714
原创 UVaOJ10673 - Play with Floor and Ceil
10673 - Play with Floor and CeilTime limit: 3.000 seconds TheoremFor any two integers x and k there exists two more integers p and q such that:It’s a fairly easy task to prove this theor
2013-07-07 15:41:58 799
转载 UVaOJ106 - Fermat vs. Pythagoras
转载自http://www.cnblogs.com/devymex/archive/2010/08/07/1799713.htmlTime limit: 3.000 seconds限时:3.000秒 Background背景Computer generated and assisted proofs and verification occupy a s
2013-07-07 15:11:23 673
原创 UVaOJ128 - Software CRC
128 - Software CRCTime limit: 3.000 secondsYou work for a company which uses lots of personal computers. Your boss, Dr Penny Pincher, has wanted to link the computers together for some time bu
2013-07-05 16:36:22 734
原创 UVaOJ10006 - Carmichael Numbers
10006 - Carmichael NumbersTime limit: 3.000 secondsAn important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only important field in comp
2013-07-04 19:54:35 491
转载 UVaOJ138 - Street Numbers
转载自http://www.cnblogs.com/devymex/archive/2010/09/07/1818983.htmlTime limit: 3.000 seconds限时3.000秒 Problem问题A computer programmer lives in a street with houses numbered consecutively (
2013-06-07 20:06:20 637
原创 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 663
原创 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 501
原创 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 807
原创 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 740
原创 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 551
原创 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 710
原创 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 1029
原创 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 497
原创 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 558
原创 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 627
原创 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 533
原创 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 658
原创 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 550
原创 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 475
原创 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 509
原创 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 500
原创 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 508
原创 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 628
原创 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 526
原创 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 672
原创 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 466
原创 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 478
原创 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 645
原创 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 448
原创 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 763 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 689
原创 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 696 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 562
原创 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 735
原创 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 550
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人