UVa 440 - Eeny Meeny Moo
27 Aug 2019

Surely you have made the experience that when too many people use the Internet simultaneously, the net becomes very, very slow.

UVa 11311 - Exclusively Edible
29 Jul 2019

Hansel and Gretel like cakes, but especially the so called “grid cake” served in Wolfgang Puck’s restaurants. It is made of mn pieces of different cakes, resembling a 2D m-by-n grid when looked at from above (hence the name).

UVa 10034 - Freckles
29 Jul 2019

In an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad’s back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a scar, so his Ripley’s engagement falls through...

UVa 574 - Sum It Up
11 Jun 2019

Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal 4...

UVa 272 - TEX Quotes
28 May 2019

TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use “ and ” to delimit quotations, rather than the mundane " which is what is provided by most keyboards...

UVa 151 - Power Crisis
20 May 2019

During the power crisis in New Zealand this winter (caused by a shortage of rain and hence low levels in the hydro dams), a contingency scheme was developed to turn off the power to areas of the country in a systematic, totally fair, manner...

UVa 102 - Ecological Bin Packing
15 May 2019

Bin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. Some bin packing problems are NP-complete but are amenable to dynamic programming solutions or to approximately optimal heuristic solutions...

UVa 136 - Ugly Numbers
13 May 2019

Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence...

UVa 100 - The 3n + 1 problem
12 May 2019

Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs...

UVa 458 - The Decoder
11 May 2019

Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the exact message that the characters contain. The code key for this simple coding is a one for one character substitution based upon a single arithmetic manipulation of the printable portion of the ASCII character set...

UVa 299 - Train Swapping
11 May 2019

At 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 rearrange the carriages of trains...