raffle专题

Fleecing the Raffle Gym - 101550F(概率)

题意: 所有数选p个,但你可以加入a个自己的数。求选到的数中你加入数的个数恰好为1个的概率 思路: #include <cstdio>#include <cstring>#include <vector>#include <map>using namespace std;typedef long long ll;const int maxn = 1e7 + 7;double C

PAT_A 1124. Raffle for Weibo Followers (20)

1124. Raffle for Weibo Followers (20) John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo – that is, he would select winners from every N foll