https://hydro.ac/p/bzoj-P2969
将答案拆成每个位置被刷的概率之和,\(P(\text{位置 } (i, j) \text{ 被刷}) = 1 - P(不被刷) = 1 - P(单次不被刷)^k = 1 - (1 - P(单次被刷))^k\),将行和列分开考虑即可。