Need help in Diamond Collector

In this problem https://usaco.guide/silver/2P#problem-usaco-643 I think we need to find two maximum size groups of diamonds , such that a diamond will present in only one group and in a group no two diamonds will differ by size more than K. But it seems to be wrong on pretest itself. Can someone please say what actually this problem is asking…