Error:
It is a stack problem, but in this problem author makes the problem confuse. I think we need to treat the end time as end time + 1, such that the test case is correct.
Another tricky part is string handle, we use sscanf(%d%[a-z]%d) to handle the string.
So in this problem, use stack the push the log, and keep track current timestamp. When push, handle current timestamp and stack’s top timestamp, do the same thing in pop