#P1910. L 国的战斗之间谍
L 国的战斗之间谍
Description
{{As the saying goes: "Know yourself and know your enemy, and you will never be defeated in a hundred battles." The commander of Country L wants to send spies to Country I, so the task of selection falls on you.
You now have candidates. Each person has the following data: (how much intelligence they can obtain), (how poor their disguise capability is), and (the salary they demand). The enemy's counterintelligence capability is known to be (that is, the sum of for all selected people must be less than or equal to ), and you have units of money. What is the maximum amount of intelligence you can obtain?}}
Input Format
{{The first line contains three integers representing the total number of candidates, the enemy's reconnaissance capability, and the total amount of money.
From the second line to the -th line, each line contains three integers , indicating the intelligence the -th person can obtain, how poor their disguise is, and the salary they demand.}}
Output Format
{{Output a single integer representing the total amount of intelligence that can be obtained.}}
3 10 12
10 1 11
1 9 1
7 10 12
11
Hint
{{For of the testdata, , , and .}}
Translated by ChatGPT 5
京公网安备 11011102002149号