My issue
Someone please explain the third testcase
Problem Link: https://www.codechef.com/problems/BUDGET25
Someone please explain the third testcase
Problem Link: https://www.codechef.com/problems/BUDGET25
n=4 , k=2
arr={2,1,3,1}
let sort the array first
arr={1,1,2,3}
now transfer excess value from element having greater than k to maximum value less than k
arr={1,2,2,2} thus ans is 3 as we have 3 element having greater or equal to k
change k to x