{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eAfter checking his coders\u0027 skills about strings, professor Mahammad wants to analyze how well the coders are familiar with arrays. As the professor is very good at math, he is curious about adding some mathematical background to his new problem. Now, the problem asks you to find the number of subarrays in which the mathematical mean is not less than given \u003cstrong\u003eK\u003c/strong\u003e. Mean is the function which defines the average of the corresponding list. More clearly, in order to find the mean of the array, we can divide the sum of the numbers by the number of elements in it.\u0026nbsp;\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eThe first line of the input contains two positive integers \u003cstrong\u003eN\u003c/strong\u003e and \u003cstrong\u003eK\u003c/strong\u003e, the number of elements of the array and the mean, respectively. (\u003cstrong\u003eN ≤ 200000\u003c/strong\u003e).\u003c/p\u003e\r\n\u003cp\u003eThe following line contains N integers which represent elements of the array.\u003c/p\u003e\r\n\u003cp\u003e\u003cstrong\u003eAll the numbers in the input section are 32-bit positive integers.\u003c/strong\u003e\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eOutput one integer representing the number of subarrays in which \u003cstrong\u003e\u003cem\u003ethe mean is not less than K\u003c/em\u003e\u003c/strong\u003e.\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003cdiv\u003e\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 4\r\n5 2 4 5 1\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\r\n\u003cp\u003e\u003cem\u003e\u003cstrong\u003eNote\u003c/strong\u003e\u003c/em\u003e: The subarrays, satisfying the condition are: [5], [5, 2, 4, 5], [4], [5], [4, 5].\u003c/p\u003e\r\n\n\u003c/div\u003e"}}]}