Longest day problem

Question

Hints

Answer