QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22398. ああ、あの流行

Statistics

他の若者のように若い牛も時々流行に夢中になります。フラフープやペットロック、Counterstrike、Pokemon、Rick Astley、乳房の部族風タトゥーなどです。

数学的に流行の初期魅力は $L$($1 \le L \le 50,000$)。牛 $i$ の抵抗力($0 \le R_{i} \le 1,000,000$)は参加せざるを得なくなるまで避けられる長さを表します。魅力が抵抗力以上なら参加したくなります。

参加牛一頭ごとに同調圧力で魅力が $K$($1 \le K \le 2,500$)増えます。

$N$($1 \le N \le 100,000$)頭が与えられ、参加頭数を求めます。

入力

  • $1$ 行目:空白区切りの整数 $N$、$L$、$K$。

  • $2..N+1$ 行目:$i+1$ 行目は牛 $i$ の抵抗力の整数 $R_{i}$。

出力

  • $1$ 行目:最終参加頭数の整数。

入出力例

入力 1

5 2 3
2
6
12
5
14

出力 1

3

注記

五頭の抵抗力は $2,6,12,5,14$、初期魅力 $2$、参加ごとに魅力度が $3$ 増えます。

初期 $2$ で一番(抵抗力 $2$)が参加し $5$ に。四番($5$)が参加し $8$、二番($6$)で $11$ に。三番($12$)と五番($14$)は巻き込まれず、計 $3$ 頭です。

問題作成者:Jarrah Lacko、2009

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.