Uva 1047 Zones

Can anyone make a small editorial or explain me the solution of this question?

Link to question: https://uva.onlinejudge.org/external/10/1047.pdf

Thanks in advance.