题目描述
Problem Description
Iruka has $ N $ types of drugs numbered from $ 1 $ to $ N $.
She also has a list detailing the handling of these drugs.
This list contains $ M $ entries, and the $ i $th entry (1 ≤ i ≤ M) states that "mixing drugs numbered $ a_i $ and $ b_i $ will produce poison."
Iruka wants to mix as many types of drugs as possible without producing poison based on the list.
What is the maximum number of drug types she can mix?
Input Format
The input is given from the standard input in the following format:
$ N $ $ M $ $ a_1 $ $ b_1 $ $ : $ $ a_M $ $ b_M $
Output Format
Output the maximum number of drug types Iruka can mix.
Sample Input and Output
Sample Input #1
4 1
1 2
Sample Output #1
3
Sample Input #2
1 0
Sample Output #2
1
Sample Input #3
20 16
1 8
1 16
2 19
3 5
3 10
5 7
5 13
6 9
7 8
7 11
7 14
7 15
8 12
9 12
9 17
15 20
Sample Output #3
12
Notes/Hints
Constraints
- $ 1 ≤ N ≤ 40 $
- $ 0 ≤ M ≤ N(N-1)/2 $
- $ 1 ≤ a_i < b_i ≤ N $
- $ a_i ≠ a_j $ or $ b_i ≠ b_j $ (1 ≤ i < j ≤ M)
- All inputs are integers.
Sample Explanation 1
Mixing drugs numbered $ 1 $ and $ 2 $ will produce poison, so all drugs cannot be mixed. On the other hand, mixing drugs numbered $ 1 $, $ 3 $, and $ 4 $ will not produce poison. Therefore, the maximum number of drug types that can be used is $ 3 $, so output $ 3 $.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分