2013年2月7日

USACO2.3.4--Money Systems

摘要: Money SystemsThe cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Traditionally, coins come in values like 1, 5, 10, 20 or 25, 50, and 100 units, sometimes with a 2 unit coin 阅读全文

posted @ 2013-02-07 20:31 仗剑奔走天涯 阅读(192) 评论(0) 推荐(0) 编辑

USACO2.3.3--Zero Sum

摘要: Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order:1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front of the first digit). Calculate the resu 阅读全文

posted @ 2013-02-07 13:18 仗剑奔走天涯 阅读(316) 评论(0) 推荐(0) 编辑

USACO2.2.4--Party Lamps

摘要: Party LampsIOI 98To brighten up the gala dinner of the IOI'98 we have a set ofN(10 <= N <= 100) colored lamps numbered from 1 toN.The lamps are connected to four buttons:Button 1: When this button is pressed, all the lamps change their state: those that are ON are turned OFF and those that 阅读全文

posted @ 2013-02-07 00:20 仗剑奔走天涯 阅读(211) 评论(0) 推荐(0) 编辑

导航