Timus 1745
Привет всем! Помогите пожалуйста, как решить https://acm.timus.ru/problem.aspx?space=1&num=1745 эту задачу ?
Problem-solving Stream