codeforces Educational Codeforces Round 52 div2C - Make It Equal

题意 有 n n n座塔,每座塔都有一个高度 h h h,我们需要经过若干次操作使得这些塔的高度相同,操作定义为: 每次可以定义一个水平线 h 0 h_0 h0​,使得 ∑ i = 1 n m a x ( 0 , h i − h 0 ) < = k \sum_{i=1}^{n}max(0,h_i-h_0) <= k ∑i=1n​max(0,hi​−h0​)<=k。问最少需要多少次操作使
相关文章
相关标签/搜索