HBC209910Easy题解

水水月牙 算法基础篇 51 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
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=1K​ai​=N,   ∑i=1K​bi​=M,  he wlil get  P=∏i=1Kmin(ai,bi)P = prod_{i=1}^K min(a_i, b_i)P=∏i=1K​min(ai​,bi​) points. You want to know the sum of total points he can get in all possible sequences he can write.

HBC209910Easy题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC209910Easy题解