2013年8月24日

摘要: Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报第3个营地到第10个营地共有多少人!”Tidy就要马上开始计算 阅读全文
posted @ 2013-08-24 17:15 不知妖精 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:1. Emergency 9112. Alice 97 625 9993. Bob 91 12 54 26In this case, it’s not possible to call Bob, because the centr 阅读全文
posted @ 2013-08-24 09:45 不知妖精 阅读(198) 评论(0) 推荐(0) 编辑

导航