Pregunta de entrevista de Google

Difficult competitive programming as a competition