https://www.codechef.com/viewsolution/25845690
I m getting tle for this problem.
As a hint, try it on your local machine with input
1 2019:06:30
thanks bro…
you just hammered my whole logic