cake cutting2 (Medium)