摘要:
Number TrianglesConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to the left or diagonally down to the right. 7 ... 阅读全文
posted @ 2012-10-18 19:49
jiangzh
阅读(551)
评论(0)
推荐(0)
摘要:
The ClocksIOI'94 - Day 2 Consider nine clocks arranged in a 3x3 array thusly:|-------| |-------| |-------| | | | | | | | |---O | |---O | | O | | | | | | | |-------| |-------| |-------| A ... 阅读全文
posted @ 2012-10-18 17:22
jiangzh
阅读(411)
评论(0)
推荐(0)
摘要:
Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is a non-negative integer and b is a positive integer.Write a program that finds all arithmetic progressions of length n in the set S of bisquares. The set of 阅读全文
posted @ 2012-10-18 15:46
jiangzh
阅读(305)
评论(0)
推荐(0)
摘要:
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 while bucket C is full of milk. Sometimes, FJ pours milk from one bucket to another until the second 阅读全文
posted @ 2012-10-18 09:46
jiangzh
阅读(591)
评论(0)
推荐(0)