POJ2096 Collecting Bugs】的更多相关文章

Collecting Bugs Time Limit: 10000MS   Memory Limit: 64000K Total Submissions: 1792   Accepted: 832 Case Time Limit: 2000MS   Special Judge Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material st…
Collecting Bugs Time Limit: 10000MS   Memory Limit: 64000K Total Submissions: 5394   Accepted: 2670 Case Time Limit: 2000MS   Special Judge Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material s…
Collecting Bugs Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he classifies all possible bugs into n categories. Each day he discovers…
Collecting Bugs Time Limit: 10000MS   Memory Limit: 64000K Total Submissions: 6237   Accepted: 3065 Case Time Limit: 2000MS   Special Judge Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material s…
Time Limit: 10000MS   Memory Limit: 64000K Total Submissions: 5090   Accepted: 2529 Case Time Limit: 2000MS   Special Judge Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collect…
题目链接:http://poj.org/problem?id=2096 题目大意:有n种bug,有s个子系统.每天能够发现一个bug,属于一个种类并且属于一个子系统.问你每一种bug和每一个子系统都发现bug需要多少天. 设dp[i][j]为现在发现了i种bug,在j个子系统内,到目标状态需要的期望天数. 则dp[n][s] = 0,因为已经发现了n种bug在s个子系统内,不需要额外的天数了. dp[i][j]可以转移到如下状态: dp[i][j]:新发现的bug在已经发现的i种,已经发现的j个…
题目大意:有n种bug,m个程序,小明每天能找到一个bug.每次bug出现的种类和所在程序都是等机会均等的,并且默认为bug的数目无限多.如果要使每种bug都至少找到一个并且每个程序中都至少找到一个bug,小明平均需要找几天? 题目分析:定义状态dp(i,j)表示找到了 i 种程序,并且出现在了 j 个程序中还需要的平均时间.则状态转移方程为: dp(i,j)=i/n*j/m*dp(i,j)+(n-i)/n*j/m*dp(i+1,j)+i/n*(m-j)/m*dp(i,j+1)+(n-i)/n*…
传送门:http://poj.org/problem?id=2096 题面很长,大意就是说,有n种bug,s种系统,每一个bug只能属于n中bug中的一种,也只能属于s种系统中的一种.一天能找一个bug,问找到的bug涵盖所有种类的bug与所有种类的系统期望需要几天. 令f(i, j)为找到了i种bug,j种系统期望的天数,那么今天再找一个bug,有4种情况: ①,bug种类为已找到的i种中的一种,系统种类为已找到的j种中的一种,则概率p1 = (i / n) * (j / s) ②,bug种类…
偷一波翻译: 工程师可以花费一天去找出一个漏洞——这个漏洞可以是以前出现过的种类,也可能是未曾出现过的种类,同时,这个漏洞出现在每个系统的概率相同.要求得出找到n种漏洞,并且在每个系统中均发现漏洞的期望天数. Translated By 大米饼 求期望天数...那就推式子吧:dp[i][j]表示已经找出了i个漏洞,已经出现在了j个系统中的期望天数 $$dp[i][j]=(dp[i][j]+1)*\frac{i*j}{s*n}+(dp[i][j+1]+1)*\frac{i*(s-j)}{n*s}+…
[POJ2096]Collecting Bugs Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he classifies all possible bugs into n categories. E…