Inversions and Goodbye

It’s time to say goodbye to CSEmpur, at least for today. And so you wanted to give the citizens of CSEmpur a parting gift. However since you are broke, you are trying to make some gift for them. You have n binary strings. You want to concatenate some of these strings so that their length is at most k (too large strings are heavy, and you really don’t want to carry heavy gifts).


This is a companion discussion topic for the original entry at https://toph.co/p/inversions-and-goodbye