gp of yuquan
What's the intended time complexity for E? Can it be solve in O(nk)?
ICPC NA North Central and South Division