CSES 1752 Creating Offices

The guide says that this problem is equivalent to Baltic OI 2017 - cat in a tree. But I can’t find a solution to that problem too.
Problem: link