#P5978. [CEOI 2018] Global warming

[CEOI 2018] Global warming

Description

Given nn, you may choose any segment from ala_l to ara_r (1lrn1\le l\le r\le n), and add a value dd (xdx-x\le d\le x) to each element in this segment. Find the maximum length of a strictly increasing subsequence of the array aa.

Input Format

The first line contains two integers n,xn, x.

The second line contains nn integers representing a1a_1 to ana_n.

Output Format

Output one number, the maximum length of a strictly increasing subsequence of the array aa.

8 10
7 3 5 12 2 7 3 4
5

Hint

For 100%100\% of the testdata, 1n2×1051\le n\le 2\times 10^5, 0x1090\leq x\leq10^9, 1ai1091\leq a_i\leq10^9.

Translated by ChatGPT 5