[TC_SRM_460]TheCitiesAndRoadsDivOne】的更多相关文章

[TC_SRM_460]TheCitiesAndRoadsDivOne 试题描述 John and Brus have become very famous people all over the world, especially in Bolivia. Once they decided to visit their fan club in Bolivia. John has an old map of Bolivia which shows all of its cities and th…
problem1 link 设$f[i][j]$表示已经分配了answers中的前$i$个,分配给的问题的状态为 $j$的方案数. 其中状态可以用$n$位的三进制表示,0表示还未分配,1表示已分配是 Yes,2表示已分配是No. problem2 link 假设$n$个城市为[0,n-1].设$f[i][j][t]$表示在[0,i]个城市中已经选择了$j$个城市,选择了$t$个人的概率. 那么选择第$i+1$个城市的概率是$\frac{k-j}{n-i-1}$. problem3 link 首先…