A GameIOI'96 - Day 1 Consider the following two-player game played with a sequence of N positive integers (2
Fractions to DecimalsWrite a program that will accept a fraction of the form N/D, where N is the nume
Humble NumbersFor a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prim
StampsGiven a set of N stamp values (e.g., {1 cent, 3 cents}) and an upper limit K to the number of stamps that ca
ContactIOI'98 The cows have developed a new interest in scanning the universe outside their farm with radiotel
StringsobitsKim Schrijvers Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits, of course, are either 0 contai
Spinning Wheels1998 ACM NE Regionals Each of five opaque spinning wheels has one or more wedges cut out of its ed
Sweet ButterGreg Galperin -- 2001Farmer John has discovered the secret to making the sweetest butter in all of Wisconsin: su
Magic SquaresIOI'96 Following the success of the magic cube, Mr. Rubik invented its planar version, called mag
Shopping OffersIOI'95 In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zork
CamelotIOI 98 Centuries ago, King Arthur and the Knights of the Round Table used to meet every year on New Year's Day to
Home on the RangeFarmer John grazes his cows on a large, square field N (2 <= N <= 250) miles on a side (because
Transformations
Name That Number th
Palindromic Squares
Mixing Milk
Prime Cryptarithm
Sorting a Three-Valued Sequence IOI'96 - Day 2 Sorting is one of the most frequently performed compu
American HeritageFarmer John takes the heritage of his cows very seriously. He is not, however, a truly fine bookkeeper. He keeps his cow genealogies as binary trees and, instead of writing them
Subset SumsJRM For many sets of consecutive integers from 1 through N (1 For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical: {3} and {
Hamming CodesRob Kolstad Given N, B, and D: Find a set of N codewords (1 <= N <= 64), each of length B bits (1 <= B <= 8), such that each of the codewords is at least Hamming distance of D (1 <= D
Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start
The CastleIOI'94 - Day 1 In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have o
Checker ChallengeExamine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is place
Mother's MilkFarmer John has three milking buckets of capacity A, B, and C liters. Each of the numbers A, B, and C is an integer from 1 through 20, inclusive. Initially, buckets A and B are empty
Bessie Come HomeKolstad & Burch It's dinner time, and the cows are out in their separate pastures. Farmer John rings the bell so they will start walking to the barn. Your job is to figure out whic
Superprime RibButchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by one, by FJ and the USDA. Farmer John
Healthy HolsteinsBurch & Kolstad Farmer John prides himself on having th
Longest PrefixIOI'96 The structure of some biological objects is represente
N corners (3 i, yi}, i in (1..N).Every pair of adjacent vertices defines a side of the fence.
Copyright © 2005-2023 51CTO.COM 版权所有 京ICP证060544号