摘要: 描述 给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。 只有闰年有2月29日,满足以下一个条件的年份为闰年: 1. 年份能被4整除但不能被100整除 2. 年份能被400整除 输入 第一行为一个整数T,表示数据组数。 之后每组数据包含两行。每一行格式为"month da... 阅读全文
posted @ 2015-04-17 19:28 星斗万千 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Piotr likes playing with ants. He has n of them on a horizontal pole L cm long. Each ant is facing either left or right and walks at a constant spee... 阅读全文
posted @ 2015-04-17 17:27 星斗万千 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Problem A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, ev... 阅读全文
posted @ 2015-04-17 16:31 星斗万千 阅读(87) 评论(0) 推荐(0) 编辑
摘要: There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an... 阅读全文
posted @ 2015-04-17 11:58 星斗万千 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Description Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The ... 阅读全文
posted @ 2015-04-17 11:14 星斗万千 阅读(112) 评论(0) 推荐(0) 编辑