{"problem":{"name":"Meaningful Mean","description":{"content":"You are given an integer sequence of length $N$, $a =$ {$a_1, a_2, …, a_N$}, and an integer $K$. $a$ has $N(N+1)/2$ non-empty contiguous subsequences, {$a_l, a_{l+1}, …, a_r$} $(1 ≤ l ≤ r ≤ N)$. Among","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc075_c"},"statements":[{"statement_type":"Markdown","content":"You are given an integer sequence of length $N$, $a =$ {$a_1, a_2, …, a_N$}, and an integer $K$.\n$a$ has $N(N+1)/2$ non-empty contiguous subsequences, {$a_l, a_{l+1}, …, a_r$} $(1 ≤ l ≤ r ≤ N)$. Among them, how many have an arithmetic mean that is greater than or equal to $K$?\n\n## Constraints\n\n*   All input values are integers.\n*   $1 ≤ N ≤ 2 \\times 10^5$\n*   $1 ≤ K ≤ 10^9$\n*   $1 ≤ a_i ≤ 10^9$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$\n$a_1$\n$a_2$\n$:$\n$a_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc075_c","tags":[],"sample_group":[["3 6\n7\n5\n7","5\n\nAll the non-empty contiguous subsequences of $a$ are listed below:\n\n*   {$a_1$} = {$7$}\n*   {$a_1, a_2$} = {$7, 5$}\n*   {$a_1, a_2, a_3$} = {$7, 5, 7$}\n*   {$a_2$} = {$5$}\n*   {$a_2, a_3$} = {$5, 7$}\n*   {$a_3$} = {$7$}\n\nTheir means are $7$, $6$, $19/3$, $5$, $6$ and $7$, respectively, and five among them are $6$ or greater. Note that {$a_1$} and {$a_3$} are indistinguishable by the values of their elements, but we count them individually."],["1 2\n1","0"],["7 26\n10\n20\n30\n40\n30\n20\n10","13"]],"created_at":"2026-03-03 11:01:13"}}