MaxCounters
-
순회를 최소화한 알고리즘Algorithm 2021. 7. 24. 11:29
아래 문제는 코딜리티에서 제공하는 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 array A of M integers is given. This array represents consecutive operations: if A[K] = X, such that 1 ≤ X ≤ N, then operation K is..