Time to live

Problem Name:
Time to live
Site:Spoj
Links:
Tags:
Problem setters: