Loading environment...
It’s Christmas Eve at the White Oaks Mall, and there are kids waiting to take a photo with Santa.
Kid needs minutes for their photo.
If kid has to wait minutes before their turn starts, they will drop candies on the floor.
Santa can reorder the kids in any order he wants before the photo session starts, but once the order is fixed, he must take them in that order with no gaps between photos.
Your task is to determine an order of the kids so that the total number of candies dropped on the floor is minimized.
Output a permutation of the integers on a single line:
No comments yet. Be the first to comment!