Please share logic: Chef Has A Lazy Team (BUG2K18A)

Dear @admin. Hi all. I am unable solve problem “Chef Has A Lazy Team (BUG2K18A)”. Can anyone share the logic how to solve it.
My Assumptions are
X will perform all tasks. Hence it equals to N.
Y and Z perform all tasks whose cost of delivery is less than or equal to R.

Could anyone please correct my logic.

//