Restoring the Duration of Tasks

Problem Name:
Restoring the Duration of Tasks
Site:CodeForces
Links:
Tags:
Problem setters: