Open suryaprakashpandey opened 9 months ago
I would like to contribute to this, please assign this to me.
Can u please assign this issue to me . Anushka Lonkar TY Comp Cummins
I would like to work on this issue using python language -Vaishnavi Mahajan. Cummins college of engineering.(SY) Can you please assign this issue to me .
Issue resolved #147 https://github.com/Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issues/147
On Sat, 21 Oct 2023 at 17:41, GDSC Cummins X MMCOE @.***> wrote:
Assigned #147 https://github.com/Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issues/147 to @vaishnavim141003 https://github.com/vaishnavim141003.
ā Reply to this email directly, view it on GitHub https://github.com/Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issues/147#event-10731201252, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2TPB6U6N4Q5265K5RSS3EDYAO3WZAVCNFSM6AAAAAA5QIXI6OVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG4ZTCMRQGEZDKMQ . You are receiving this because you were assigned.Message ID: <Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issue/147/issue_event/10731201252 @github.com>
Write code in the preferred language and attach output with it.
You are given an array of n integers. Your task is to calculate for each window of k elements, from left to right, the minimum total cost of making all elements equal.
You can increase or decrease each element with cost x where x is the difference between the new and the original value. The total cost is the sum of such costs.
Input The first input line contains two integers n and k: the number of elements and the size of the window.
Then there are n integers x1,x2,ā¦,xn: the contents of the array.
Output Output nāk+1 values: the costs.
Example:
Input: 8 3 2 4 3 5 8 1 2 1 Output: 2 2 5 7 7 1