Блог пользователя subrat0018

Автор subrat0018, история, 5 месяцев назад, По-английски

Hello everyone!

I was upsolving ICPC 2021 Amritapuri Regional Contest. I am stuck on the problem Grid jumps. I searched for editorials or discussions but couldn't find any. So this blog is my last hope :((((

Here is the problem link — Grid jumps

Thanks in advance!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор subrat0018, история, 10 месяцев назад, По-английски

I came across an interesting problem while giving Junglee CodeFest at HackerEarth. I could not solve the problem in the contest. Is anyone up with any approach?

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

Array elements are less than 1e9

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится