Quite often the jury of Saratov SU use the problem "Masquerade" in different practice sessions before the contest. This problem is quite easy — all you need is to print the product of two integers which were read from the input stream. As usual,…
BUPT2017 wintertraining(15) #4G Gym - 101124 E.Dance Party 题意 有c种颜色,每个颜色最多分配给两个人,有M个男士,F个女士,求至少一对男士同色的概率. \((1 \le C, M, F \le 10^9; M + F \le 2C)\) 题解 反面比较好求的,也就是不存在男男同色的概率. 假设每个男士依次选择剩下的颜色,第一个人有2C种选择,当前不同色的概率是1,第二个人有2C-1种选择,当前不同色的概率是(2C-2)/(2C-1),第…
Problem D"Decoding Task" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100002 Description In the near future any research and publications about cryptography are outlawed throughout the world on the grounds of national se…