思路: 我们可以先求在n个人中有r个人买东西的概率,然后求出在这r个人中当且要求的人也在里面的概率,然后一除就是答案 至于求概率的过程要用dp实现 c o d e code code #include<iostream> #include<cstring> #include<cstdio> using namespace std; int n, r; double f[100][100], p[100]; double</