摘要: Description:Linda is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay for two, she goes completely ma... 阅读全文
posted @ 2015-12-14 19:31 羽珞 阅读(458) 评论(0) 推荐(0) 编辑
摘要: Description:一根长度为L厘米的木棒上有N只蚂蚁,每只蚂蚁要么向左走,要么向右走,速度为1厘米/秒。当两只蚂蚁相撞时,他们会同时掉头(掉头时间不计)给出每只蚂蚁距离木棒左端的距离,问多少秒后,刚好所有蚂蚁都从木棒上掉下来。N 和 L均不超过1000输入第一行两个整数,分别是N和L接下来N行... 阅读全文
posted @ 2015-12-14 18:47 羽珞 阅读(286) 评论(0) 推荐(0) 编辑