Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

Need help for this problem came in meesho online assessment 2025

Правка en3, от alaincr7, 2025-10-30 20:45:32

Given an array arr of N integers. Each array has some hardness

hardness = max abs(arr[i+1]-arr[i]) for all 1<=i<=N-1

And hardness = 0 if N<=1

You are given a number K you can change at most K elements of the array. You have to minimize the hardness of the array

Both N and K were less than 2000

where arr[i]>=-1e9 and arr[i]<=1e9

Теги binary search, dynamic programming

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский alaincr7 2025-10-30 20:45:32 1
en2 Английский alaincr7 2025-10-24 22:19:14 52
en1 Английский alaincr7 2025-10-24 22:13:37 429 Initial revision (published)