- 博客(33)
- 收藏
- 关注
原创 UVa 572 - Oil Deposits
Oil DepositsThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates
2013-03-22 15:28:28 457
原创 UVa 699 - The Falling Leaves
The Falling LeavesEach year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the tre
2013-03-10 15:35:05 658
原创 UVa 297 - Quadtrees
QuadtreesA quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be
2013-03-08 15:07:41 560
原创 UVa 548 - Tree
Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is th
2013-03-03 15:22:05 297
原创 UVa 112 - Tree Summing
Tree SummingBackgroundLISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the
2013-03-02 21:32:59 347
原创 UVa 540 - Team Queue
Team QueueQueues and Priority Queues are data structures which are known to most computer scientists. TheTeam Queue, however, is not so well known, though it occurs often in everyday lif
2013-02-24 01:12:53 362
原创 UVa 11111 - Generalized Matrioshkas
Problem B - Generalized MatrioshkasVladimir worked for years making matrioshkas, those nesting dolls that certainly represent truly Russian craft. A matrioshka is a doll that may be op
2013-02-23 17:26:03 324
原创 UVa 442 - Matrix Chain Multiplication
Matrix Chain MultiplicationSuppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which mult
2013-02-22 22:52:22 333
原创 UVa 673 - Parentheses Balance
Parentheses BalanceYou are given a string consisting of parentheses () and []. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and B are correct, AB
2013-02-21 16:31:01 266
原创 UVa 10152 - ShellSort
Problem D: ShellSort He made each turtle stand on another one's backAnd he piled them all up in a nine-turtle stack.And then Yertle climbed up. He sat down on the pile.What a wonderful view! H
2013-02-20 17:25:02 333
原创 UVa 133 - The Dole Queue
The Dole QueueIn a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applican
2013-02-19 17:57:15 353
原创 UVa 101 - The Blocks Problem
The Blocks ProblemBackgroundMany areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and ro
2013-02-18 21:02:10 428
原创 UVa 127 - "Accordian" Patience
``Accordian'' PatienceYou are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows:Deal cards one by one in a row from left to right, not overl
2013-02-18 14:38:06 294
原创 UVa 123 - Searching Quickly
Searching QuicklyBackgroundSearching and sorting are part of the theory and practice of computer science. For example, binary search provides a good example of an easy-to-understa
2013-02-11 00:04:10 355
原创 UVa 10878 - Decode the tape
Problem ADecode the tapeTime Limit: 1 second"Machines take me by surprise with great frequency."Alan TuringYour boss has just unearthed a roll of old computer tapes. The
2013-02-10 14:53:00 342
原创 UVa10815 - Andy's First Dictionary
Problem B: Andy's First DictionaryTime limit: 3 secondsAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of wo
2013-02-10 14:51:37 380
原创 UVa 10115 - Automatic Editing
Problem E: Automatic EditingSource file:autoedit.{c, cpp,java, pas}Input file:autoedit.inOutput file:autoedit.outText-processing tools like awk and sed allow you
2013-02-10 14:49:30 378
原创 UVa 10106 - Product
ProductThe ProblemThe problem is to multiply two integers X, Y. (0250)The InputThe input will consist of a set of pairs of lines. Each line in pair contains one multiplye
2013-02-09 23:44:15 278
原创 UVa 748 - Exponentiation
ExponentiationProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience fo
2013-02-09 23:39:59 283
原创 UVa 755 - 487--3279
487-3279Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the Un
2013-02-09 23:03:23 335
原创 UVa 400 - Unix ls
Unix lsThe computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along with the new computer. Your
2013-02-09 20:13:55 491
原创 UVa 156 - Ananagrams
AnanagramsMost crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not h
2013-02-08 22:31:34 310
原创 UVa 120 - Stacks of Flapjacks
Stacks of FlapjacksBackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete eve
2013-02-08 16:07:10 263
原创 UVa 644 - Immediate Decodability
Immediate DecodabilityAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that
2013-02-07 21:19:11 280
原创 UVa 152 - Tree's a Crowd
Tree's a CrowdDr William Larch, noted plant psychologist and inventor of the phrase ``Think like a tree--Think Fig'' has invented a new classification system for trees. This is a complicated
2013-02-07 21:16:02 244
原创 UVa 299 - Train Swapping
Train SwappingAt an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee of the railroad, whose sole job it is to rearran
2013-02-07 21:13:00 366
原创 UVa 10474 - Where is the Marble?
Where is the Marble?Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after anothe
2013-02-07 16:32:20 523
原创 UVa 10420 - List of Conquests
Problem BList of ConquestsInput:standard inputOutput: standard outputTime Limit: 2 secondsIn Act I, Leporello is telling Donna Elvira about his master's long list of conquests:``This is
2013-02-06 23:46:28 313
原创 UVa 340 - Master-Mind Hints
Master-Mind HintsMasterMind is a game for two players. One of them, Designer, selects a secret code. The other, Breaker, tries to break it. A code is no more than a row of colored dots.
2013-02-06 22:57:50 377
原创 UVa 465 - Overflow
OverflowWrite a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expression is too large to be represented
2013-02-06 19:53:09 246
原创 UVa 424 - Integer Inquiry
Integer InquiryOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of th
2013-02-05 23:47:23 277
原创 UVa 10494 - If We Were a Child Again
Problem CIf We Were a Child AgainInput: standard inputOutput: standard outputTime Limit: 7 seconds“Oooooooooooooooh!If I could do the easy mathematics like my school days!!I can
2013-02-05 21:41:18 494
原创 UVa 409 - Excuses, Excuses!
Excuses, Excuses!Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to
2013-02-05 19:40:15 401
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人