Loading content...
A recruiting team is filling open roles from a candidate pool and must obey a strict staffing policy tied to a fixed monthly compensation budget.
Table: Candidates
Budget policy:
Important interpretation details:
Task: Return the final hiring counts for both experience levels.
Output requirements:
Supported submission environments:
Candidates:
| employee_id | experience | salary |
|-------------|------------|--------|
| 1 | Junior | 10000 |
| 9 | Junior | 10000 |
| 2 | Senior | 20000 |
| 11 | Senior | 20000 |
| 13 | Senior | 50000 |
| 4 | Junior | 40000 |[
{"experience":"Senior","accepted_candidates":2},
{"experience":"Junior","accepted_candidates":2}
]The best senior choice is salaries 20000 and 20000, spending 40000 and leaving 30000. With that remainder, two juniors with salary 10000 each can be hired.
Candidates:
| employee_id | experience | salary |
|-------------|------------|--------|
| 1 | Junior | 10000 |
| 9 | Junior | 10000 |
| 2 | Senior | 80000 |
| 11 | Senior | 80000 |
| 13 | Senior | 80000 |
| 4 | Junior | 40000 |[
{"experience":"Senior","accepted_candidates":0},
{"experience":"Junior","accepted_candidates":3}
]No senior is affordable under the 70000 budget. The full budget is therefore available to juniors, allowing all three junior candidates to be hired.
Candidates:
| employee_id | experience | salary |
|-------------|------------|--------|
| 101 | Senior | 35000 |
| 102 | Senior | 35000 |
| 103 | Senior | 35000 |
| 201 | Junior | 12000 |
| 202 | Junior | 15000 |[
{"experience":"Senior","accepted_candidates":2},
{"experience":"Junior","accepted_candidates":0}
]Two seniors consume the full budget (35000 + 35000 = 70000), leaving no budget for junior hiring.
Constraints