The Endspeaker (Hard Version)

Problem Name:
The Endspeaker (Hard Version)
Site:CodeForces
Links:
Tags: