HBC51264科学家的模型,思维Intervals题解

爱的那么颓废 算法基础篇 74 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
reads the number of intervals, their end points and integers. computes the minimal size of a set Z of integers which has at least ci common elements with interval [ai, bi], for each

You are given n closed, integer intervals [ai, bi] and n integers c_1, dots, c_n c 1 ​ ,…,c n ​ . Write a program that: reads the number of intervals, their end points and integers c_1, dots, c_n c 1 ​ ,…,c n ​ .  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,2dots ,n i=1,2…,n, writes the answer to the standard output.

HBC51264科学家的模型,思维Intervals题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC51264科学家的模型 思维Intervals题解