interesting problem

Правка en1, от TuHoangAnh, 2022-07-14 15:30:23

you are given an array A of n positive integer and r moves.

on each move: you can choose any subarray of A (which contains only positive elements) and decrease all elements in that subarray by one.

your task is to maximize the number of 0 values in your array.

print that number after r moves.

input:

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский TuHoangAnh 2022-07-14 15:51:45 6
en2 Английский TuHoangAnh 2022-07-14 15:48:16 378 Tiny change: 'n\n$4$\n\n' -> 'n\n$4$\n\n- **subtask1:** $n<=10;r=1$\n- **subtask2:** $n<=10;r=1$\n' (published)
en1 Английский TuHoangAnh 2022-07-14 15:30:23 354 Initial revision (saved to drafts)