december long 2016

base

#1

I was solving some past contest problems. I cant get the editorial for this particular problem! Can someone help me with this problem

Problem