Set 104Question 55

Wasif's Budget Allocation

HardWritten in CMust finish in 3 seconds

Wasif must choose which of several proposals to fund at a transport authority, each with a cost and expected impact, to maximize impact within budget.

What your program reads

Line1: N W. Next N lines: cost impact.

What your program prints

Maximum achievable impact.

Limits

1 ≤ N ≤ 500

Example input

3 50
10 60
20 100
30 120

Expected output

220
main.c

Your work is saved in this browser as you type.

Loading editor…
Input for Run

Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.

Shortcut: Ctrl + Enter sends it to the judge.

Wasif's Budget Allocation · DIU ContestHub