Know Your Duration of Stay

Problem Name:
Know Your Duration of Stay
Site:CodeForces
Links:
Tags: