Help needed on a CSES DP problem "Coding Company"

Does anyone know how to tackle with this problem?
Coding Company CSES - Coding Company

Any hint will be appreciated.
Thanks.

1 Like

You can look for the solution here.