Gregor and the Two Painters

Problem Name:
Gregor and the Two Painters
Site:CodeForces
Links:
Tags:
Problem setters: