摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB There are N lights in a line. Given the states (on/off) of the lights, your task is to determine at least how many lights should be switched (from on... 阅读全文
posted @ 2012-04-01 17:37 Gavin Lipeng Ma 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Given an positive integer A (1 <= A <= 100), output the lowest bit of A. For example, given A = 26, we can write A in binary form as 11010, so the... 阅读全文
posted @ 2012-04-01 17:37 Gavin Lipeng Ma 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Sam and Ella run a catering service. They like to put on a show when serving meatballs to guests seated at round tables. They march out of the kitche... 阅读全文
posted @ 2012-04-01 13:40 Gavin Lipeng Ma 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Tan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the cu... 阅读全文
posted @ 2012-04-01 09:33 Gavin Lipeng Ma 阅读(307) 评论(0) 推荐(0) 编辑