--이전중입니다--/알고리즘 4

codility - MinAvgTwoSlice ( java, javascript)

codility / traning center [MaxCounters] You are given N counters, initially set to 0, and you have two possible operations on them:increase(X) − counter X is increased by 1,max counter − all counters are set to the maximum value of any counter.A non-empty zero-indexed array A of M integers is given. This array represents consecutive operations:if A[K] = X, such that 1 ≤ X ≤ N, then operation K i..