Mr. W is writing sequences. If he writes two positive integer sequences A and B with length K which satify∑i=1Kai=N,∑i=1Kbi=Msum_{i = 1}^{K} a_i = N , sum_{i = 1}^{K} b_i = M∑i=1Kai=N,∑i=1Kbi=M, he wlil getP=∏i=1KminP = prod_{i=1}^K minP=∏i=1Kminpoints. You want to know the sum of total points he can get in all possible sequences he can write.
Mr. W is writing sequences. If he writes two positive integer sequences A and B with length K which satify ∑i=1Kai=N, ∑i=1Kbi=Msum_{i = 1}^{K} a_i = N , sum_{i = 1}^{K} b_i = M∑i=1Kai=N, ∑i=1Kbi=M, he wlil get P=∏i=1Kmin(ai,bi)P = prod_{i=1}^K min(a_i, b_i)P=∏i=1Kmin(ai,bi) points. You want to know the sum of total points he can get in all possible sequences he can write.
(图片来源网络,侵删)
标签: HBC209910Easy题解