https://www.hackerrank.com/contests/world-codesprint-6/challenges/beautiful-3-set
I can't quite understand how to solve the problem. Although there is an editorial it's really poorly written as it only explains how to get an upperbound for the number of sets but it doesn't explain why that upperbound is achievable and how to come up with a formula for the numbers that satisfy the bound.
Thanks in advance.