CF612D The Union of k-Segments
Description
You are given $ n $ segments on the coordinate axis Ox and the number $ k $ . The point is satisfied if it belongs to at least $ k $ segments. Find the smallest (by the number of segments) set of segments on the coordinate axis Ox which contains all satisfied points and no others.
Input Format
The first line contains two integers $ n $ and $ k $ ( $ 1
Output Format
First line contains integer $ m $ — the smallest number of segments.
Next $ m $ lines contain two integers $ a_{j},b_{j} $ ( $ a_{j}