You can also solve this in O(logn) using a physical binary search:
1) Move half the boxes to another room.
2) Listen for a beep and determine which room the beep comes from.
3) Take the boxes in that room and split it in half again.
4) Repeat until one box is left.
> Move half the boxes to another room.
Alternatively, no.