Time limit
3000 ms
Memory limit
262144 kB
Source
Codeforces Round #558 (Div. 2)
Tags
data structures geometry implementation math *1900
Editorial
Announcement (en) Tutorial (en)
Descriptions:

Power Transmission (Hard Edition)

CodeForces - 1163C2