10035 - Primary Arithmetic

摘要: Children are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the "carry" operation - in which a 1 is carried from one digit position to be added to the next - to be a significant challenge. Your job is to count the number of carry operations for each of 阅读全文
posted @ 2013-02-03 23:10 喂喂还债啦 阅读(1091) 评论(0) 推荐(0)

10038 - Jolly Jumpers

摘要: A sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance,1 4 2 3is a jolly jumper, because the absolutes differences are 3, 2, and 1 respectively. The definition implies that any s 阅读全文
posted @ 2013-02-03 11:19 喂喂还债啦 阅读(274) 评论(0) 推荐(0)

102 - Ecological Bin Packing

摘要: BackgroundBin 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 solution 阅读全文
posted @ 2013-02-03 09:41 喂喂还债啦 阅读(363) 评论(0) 推荐(0)