{"problem":{"name":"Silver Fox vs Monster","description":{"content":"Silver Fox is fighting with $N$ monsters. The monsters are standing in a row, and we can assume them to be standing on a number line. The $i$\\-th monster, standing at the coordinate $X_i$, has the _he","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc153_f"},"statements":[{"statement_type":"Markdown","content":"Silver Fox is fighting with $N$ monsters.\nThe monsters are standing in a row, and we can assume them to be standing on a number line. The $i$\\-th monster, standing at the coordinate $X_i$, has the _health_ of $H_i$.\nSilver Fox can use bombs to attack the monsters. Using a bomb at the coordinate $x$ decreases the healths of all monsters between the coordinates $x-D$ and $x+D$ (inclusive) by $A$. There is no way other than bombs to decrease the monster's health.\nSilver Fox wins when all the monsters' healths become $0$ or below.\nFind the minimum number of bombs needed to win.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $0 \\leq D \\leq 10^9$\n*   $1 \\leq A \\leq 10^9$\n*   $0 \\leq X_i \\leq 10^9$\n*   $1 \\leq H_i \\leq 10^9$\n*   $X_i$ are distinct.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $D$ $A$\n$X_1$ $H_1$\n$:$\n$X_N$ $H_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc153_f","tags":[],"sample_group":[["3 3 2\n1 2\n5 4\n9 2","2\n\nFirst, let us use a bomb at the coordinate $4$ to decrease the first and second monsters' health by $2$.\nThen, use a bomb at the coordinate $6$ to decrease the second and third monsters' health by $2$.\nNow, all the monsters' healths are $0$. We cannot make all the monsters' health drop to $0$ or below with just one bomb."],["9 4 1\n1 5\n2 4\n3 3\n4 2\n5 1\n6 2\n7 3\n8 4\n9 5","5\n\nWe should use five bombs at the coordinate $5$."],["3 0 1\n300000000 1000000000\n100000000 1000000000\n200000000 1000000000","3000000000\n\nWatch out for overflow."]],"created_at":"2026-03-03 11:01:13"}}