Time Limit: 2000MS | Memory Limit: 65536K | |
Total Submissions: 22996 | Accepted: 8678 |
Description
Write a program that:
reads the number of intervals, their end points and integers c1, ..., cn from the standard input,
computes the minimal size of a set Z of integers which has at least ci common elements with interval [ai, bi], for each i=1,2,...,n,
writes the answer to the standard output.