SP116 INTERVAL - Intervals

Description

You are given n closed integer intervals \[a $ _{i} $ , b $ _{i} $ \] and n integers c $ _{1} $ , ..., c $ _{n} $ . ### Task Write a program that: - reads the number of intervals, their endpoints and integers c $ _{1} $ , ..., c $ _{n} $ from the standard input, - computes the minimal size of a set Z of integers which has at least c $ _{i} $ common elements with interval \[a $ _{i} $ , b $ _{i} $ \], for each i = 1, 2, ..., n, - writes the answer to the standard output.

Input Format

N/A

Output Format

N/A