Previous Year Google Coding Challenge, Need Help...

Правка en4, от conan45, 2024-09-16 20:58:14

Two type of operations

Type1: replace A[i] by A[i]-1

Type2: Replace A[i] to 0.

Determine maximum length of subarray that can be obtained if all elements of subarray are zero and you can apply max operations of x and y of type 1 and 2 respectively.

Constraints: 1<=T<=7

1<=N<=1e5

0<=A[i]<=1e9

0<=Y<=1e9

0<=X<=1e14.

Reference Images:

Теги dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский conan45 2024-09-16 20:58:14 48
en3 Английский conan45 2024-09-12 12:47:54 245
en2 Английский conan45 2024-09-12 12:44:35 3 Tiny change: '[i] by A[i-1] \n\nType2:' -> '[i] by A[i]-1\n\nType2:'
en1 Английский conan45 2024-09-12 10:27:45 393 Initial revision (published)