#Lutece1433. 图论题!

图论题!

Migrated from Lutece 1433 图论题!

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给出一个n个点,m条边的无向图。

找出点数最多的导出子图,使得子图中任意一点都在某个奇数环当中。

导出子图:对于图G<V,E>。设V1是V的一个非空子集,以V1为顶点集,以两端点均在V1中的边的全体为边集的子图称为G的导出子图。

奇数环:点数大于等于3且为奇数的简单环。

Input

输入有多组数据。

对于每组数据, 第一行为两个整数n,m,3<=n<=1000,m<=(n*(n-1))/2。

接下来m行每行两个整数,表示一条边的两个端点。

Output

对于每组数据输出一行:包含一个整数,最大的导出子图的点数。

Samples

5 5
1 2
1 3
2 3
2 4
3 5
7 7
7 2
2 6
2 3
1 5
6 1
5 4
5 3
3
5

Resources

2016 UESTC Training for Graph Theory