CF1364D Ehab's Last Corollary

题目描述

给出一张 $n$ 个点的无向连通图和一个常数 $k$。 你需要解决以下两个问题的任何一个: 1. 找出一个大小为 $\lceil\frac k2\rceil$ 的独立集。 2. 找出一个大小不超过 $k$ 的环。 独立集是一个点的集合,满足其中任意两点之间在原图上没有边直接相连。 可以证明这两个问题必然有一个可以被解决。

输入格式

输出格式

说明/提示

In the first sample: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1364D/d88a261fa9a66f32b8e1ea751b0f14dbdbd48167.png) Notice that printing the independent set $ \{2,4\} $ is also OK, but printing the cycle $ 1-2-3-4 $ isn't, because its length must be at most $ 3 $ . In the second sample: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1364D/82eb155f88993f877d4d28e552ae881205f0be8e.png) Notice that printing the independent set $ \{1,3\} $ or printing the cycle $ 2-1-4 $ is also OK. In the third sample: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1364D/2c8156bfe6625e5c46e8dbef417d8ad710f6c977.png) In the fourth sample: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1364D/e5b84e0ab62337c524394523ccb0de61f016a191.png)