摘要: 1037. Magic Coupon (25)时间限制100 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product back! What is more, 阅读全文
posted @ 2013-09-07 16:14 路萧 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 1035. Password (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (ze 阅读全文
posted @ 2013-09-07 15:09 路萧 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 1031. Hello World for U (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:h de ll rlowoThat is, the characters must be printed in the 阅读全文
posted @ 2013-09-07 13:27 路萧 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1029. Median (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The median of two sequences 阅读全文
posted @ 2013-09-07 10:01 路萧 阅读(368) 评论(0) 推荐(0) 编辑