A Story of One Country (Hard)

Problem Name:
A Story of One Country (Hard)
Site:CodeForces
Links:
Tags:
Problem setters: