Solving the Santa Claus Problem with Java and Scala.