I was trying to solve this problem .I read the editorial here but I am unable to figure out why C(i) = sum of C(j) just on the property that C(i) is in between 0 & M — 1 && that M divides (C(i) — sum of C(j)). If someone can help it will be highly appreciated. Thanx.