I am dealing with a problem where I need to greedily choose some elements whose sum greater or equals to p.Here , another condition is that the difference between total sum