Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Sunscreen
Description To avoid unsightly burns while tanning, each of the minSPF ≤ _{i}maxSPF ≤ 1,000) that will work. If the _{i}SPF rating is too low, the cow suffers sunburn; if the SPF rating is too high, the cow doesn't tan at all........The cows have a picnic basket with SPF ≤ 1,000). Lotion bottle _{i}i can cover cover cows with lotion. A cow may lotion from only one bottle._{i}What is the maximum number of cows that can protect themselves while tanning given the available lotions? Input * Line 1: Two space-separated integers: maxSPF _{i}* Lines C+2..C+L+1: Line i+C+1 describes a sunscreen lotion bottle i with space-separated integers: SPF and _{i}cover _{i}Output A single line with an integer that is the maximum number of cows that can be protected while tanning Sample Input 3 2 3 10 2 5 1 5 6 2 4 1 Sample Output 2 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator