相关链接
题目传送门:https://www.codechef.com/problems/DINING
官方题解:https://discuss.codechef.com/questions/70332/dining-editorial
解题报告
这题套路啊,神™套路啊!
关键问题是它的概率是乘起来的,不是加起来
于是很多东西都不能用啊!
于是题解说我们可以取对数,因为$\log(a \cdot b) = \log (a) + \log (b)$
于是就变成了加法,于是就可以跑一个费用流了
把乘法换搞成加法,在模意义下还有一种做法,参见:
http://oi.cyo.ng/?p=2702
I don’t ordinarily comment but I gotta state appreciate it for the post on this perfect one : D.
You made some clear points there. I looked on the internet for the subject and found most individuals will agree with your website.