摘要: Shoot Accept:7 Submit:7 Time Limit:1000MS Memory Limit:65536KBDescriptionKimi has two types of guns in his gun box. When Kimi use Gun 1 to shoot, there's a probability of p to hit the target. Meanwhile, when he uses Gun 2, the probability of making an accurate shoot becomes q.One day, Kimi went 阅读全文
posted @ 2013-07-12 22:32 ~~Snail~~ 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Maximum Accept:5 Submit:24 Time Limit:1000MS Memory Limit:65536KBDescriptionDefine f(x) as the number of 1s under base 2. For instance, f(5)=2 for (5)10=(101)2, and f(7)=3 for (7)10=(111)2.Given [A,B], you're required to figure out the maximum f(x) where x is in range [A,B].Input FormatAn intege 阅读全文
posted @ 2013-07-12 22:19 ~~Snail~~ 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Easy Game Accept:7 Submit:7 Time Limit:1000MS Memory Limit:65536KBDescriptionIt's going to be a very easy game to all of you, and that's why the problem is placed at problem A.There are n coins on the desk. Alice and Bob are taking these coins alternately, and Alice starts first. The rules a 阅读全文
posted @ 2013-07-12 22:04 ~~Snail~~ 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Largest Square Accept:24 Submit:50 Time Limit:5000MS Memory Limit:65536KB DescriptionGive you a N*N(1≤N≤2000)Square.For each grid in the square,its color is red or black.Your task is to find a largest red square.InputFormatThe first line is an integer T(1≤T≤5) indicating the case number.For each... 阅读全文
posted @ 2013-07-12 20:57 ~~Snail~~ 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Gold Balanced LineupTime Limit:2000MSMemory Limit:65536KTotal Submissions:10516Accepted:3145DescriptionFarmer John'sNcows (1 ≤N≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of onlyKdifferent features (1 ≤K≤ 30). For 阅读全文
posted @ 2013-07-12 20:40 ~~Snail~~ 阅读(184) 评论(0) 推荐(0) 编辑
摘要: To the MaxTime Limit:1000MSMemory Limit:10000KTotal Submissions:36422Accepted:19130DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of all t 阅读全文
posted @ 2013-07-12 11:05 ~~Snail~~ 阅读(151) 评论(0) 推荐(0) 编辑
摘要: TrianglesAccept:12 Submit:28 Time Limit:1000MS Memory Limit:65536KBDescriptionThere are points given in a space. There are no three points, such that they lie on the same straight line. Each pair of points is connected by a segment coloured red or black. Each triangle, whose sides have the same colo 阅读全文
posted @ 2013-07-12 09:34 ~~Snail~~ 阅读(253) 评论(0) 推荐(0) 编辑