{"problem":{"name":"Division into Two","description":{"content":"There is a set consisting of $N$ distinct integers. The $i$\\-th smallest element in this set is $S_i$. We want to divide this set into two sets, $X$ and $Y$, such that: *   The absolute difference of","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc009_c"},"statements":[{"statement_type":"Markdown","content":"There is a set consisting of $N$ distinct integers. The $i$\\-th smallest element in this set is $S_i$. We want to divide this set into two sets, $X$ and $Y$, such that:\n\n*   The absolute difference of any two distinct elements in $X$ is $A$ or greater.\n*   The absolute difference of any two distinct elements in $Y$ is $B$ or greater.\n\nHow many ways are there to perform such division, modulo $10^9 + 7$? Note that one of $X$ and $Y$ may be empty.\n\n## Constraints\n\n*   All input values are integers.\n*   $1 ≦ N ≦ 10^5$\n*   $1 ≦ A , B ≦ 10^{18}$\n*   $0 ≦ S_i ≦ 10^{18}(1 ≦ i ≦ N)$\n*   $S_i < S_{i+1}(1 ≦ i ≦ N - 1)$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $A$ $B$\n$S_1$\n:\n$S_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc009_c","tags":[],"sample_group":[["5 3 7\n1\n3\n6\n9\n12","5\n\nThere are five ways to perform division:\n\n*   $X=${$1,6,9,12$}, $Y=${$3$}\n*   $X=${$1,6,9$}, $Y=${$3,12$}\n*   $X=${$3,6,9,12$}, $Y=${$1$}\n*   $X=${$3,6,9$}, $Y=${$1,12$}\n*   $X=${$3,6,12$}, $Y=${$1,9$}"],["7 5 3\n0\n2\n4\n7\n8\n11\n15","4"],["8 2 9\n3\n4\n5\n13\n15\n22\n26\n32","13"],["3 3 4\n5\n6\n7","0"]],"created_at":"2026-03-03 11:01:14"}}