poj 4438 Hunters】的更多相关文章

Hunters Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1588    Accepted Submission(s): 1194 Problem Description Alice and Bob are the topmost hunters in the forest, so no preys can escape from…
Hunters Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1735    Accepted Submission(s): 1308 Problem Description Alice and Bob are the topmost hunters in the forest, so no preys can escape from…
题意:猎人A和B要进行一场比赛.现在有两个猎物老虎和狼,打死老虎可以得X分,打死狼可以得Y分.现在有两种情况: (1)如果A与B的预定目标不同,那么他们都将猎到预定的目标. (2)如果A与B的预定目标相同,A杀死目标的概率为P,B杀死这个目标的概率为1-P.接着他们将猎取第二只猎物,概率同上. 现在A知道B选择老虎作为他的首目标的概率为Q,B选狼作为首目标的概率为1-Q.所以A必须选择他的首目标,来使得他的期望分数最高. 析:分情况讨论么,首先选Tiger,再选Wolf,看看哪个大,就选哪个,比…
本文转载于 http://blog.csdn.net/major_zhang/article/details/52197538 2012天津区域赛最水之题: 题意容易读懂,然后就是分情况求出A得分的数学期望,所谓数学期望就是在该概率下的平均得分. 现在就是两种方案,Alice要根据输入给出的数据情况选出最优方案,也就是先选老虎,还是狼. 1.A先选老虎: a.B也先选老虎,则得分为Q(P*X+P*Y); //打完老虎还要打狼 b.B选狼,则两人可以直接获得猎物,则得分为(1-Q)*X 所以1方案…
Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798   Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets…
Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   Special Judge Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000…
The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286   Accepted: 8603   Special Judge Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a…
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the…
Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yumm…
Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050   Accepted: 10989 Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representatio…