POJ2151-Check the difficulty of problems】的更多相关文章

题目链接:http://poj.org/problem?id=2151 题目大意:有M个题目,T支队伍,第i个队伍做出第j个题目的概率为Pij,问每个队伍都至少做出1个题并且至少有一个队伍做出N题的概率. 先定义状态dp[i][j][k],代表第i支队伍从前j个题目里正好做出k题的概率. 有:dp[i][j][k] = dp[i][j-1][k]*(1-p[i][j]) + dp[i][j-1][k-1]*p[i][j]; 然后设f[i]为前i支队伍里,每队至少做出一个题并且至少有一个队伍做出N…
解题关键:主要就是概率的推导以及至少的转化,至少的转化是需要有前提条件的. 转移方程:$dp[i][j][k] = dp[i][j - 1][k - 1]*p + dp[i][j - 1][k]*(1 - p)$ 其中$dp[i][j][k]$表示第$i$个人前j题恰好ac了$k$题.然后用前缀和处理一下最后的结果. 每队至少AC一题 反向考虑,用1-每队没A题的概率,再用乘法原理结合一下. 冠军队至少AC$n-1$题,也就是存在一支队伍AC数>=n-1,依然反向考虑,不过是在每队AC至少一题的…
以前做过的题目了....补集+DP        Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 4091   Accepted: 1811 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult,…
Check the difficulty of problems Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 5830 Accepted: 2542 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect…
Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5457   Accepted: 2400 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually exp…
Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 4522   Accepted: 1993 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually exp…
题目链接: http://poj.org/problem?id=2151 Check the difficulty of problems Time Limit: 2000MSMemory Limit: 65536K 问题描述 Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contes…
Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8903   Accepted: 3772 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually exp…
Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 4748   Accepted: 2078 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually exp…
http://poj.org/problem?id=2151 (题目链接) 题意 T支队伍,一共M道题,第i支队伍解出第j道题的概率为p[i][j].问每支队伍至少解出1道题并且解题最多的的队伍至少解出N道题的概率. Solution 我终于明白了,这种题目,永远也不要想着去搞清楚样例是怎么算出来的,只要列出你认为正确的dp方程就行了.. 于是这道题,令${f_{i,j,k}}$表示第i个队伍,前j道题,解出k道的概率.转移很显然: $${f_{i,j,k}=f_{i,j-1,k-1}*p_{i…