CF1015A Points in Segments

题目描述

有n条线段在数轴Ox上,每条线段有介于1到m之间的整数端点。线段之间可以重合、覆盖甚至相同。每条线段由两个整数li和ri描述(1

输入格式

第一行包括两个整数n,m(1

输出格式

第一行输出一个整数 k--不属于任何线段的点的数量。 第二行以任意顺序输出k个整数--不属于任何线段的点数。 如果根本没有这样的点,第一行输出一个整数0并留空第二行或者根本不输出第二行。

说明/提示

In the first example the point $ 1 $ belongs to the second segment, the point $ 2 $ belongs to the first and the second segments and the point $ 5 $ belongs to the third segment. The points $ 3 $ and $ 4 $ do not belong to any segment. In the second example all the points from $ 1 $ to $ 7 $ belong to the first segment.