logo AlgoBeat OnlineJudge
登录 注册

#207233. 「Wdcfr-1」Yet Another Cirno Game (easy version)

内存限制:512 MiB 时间限制:1500 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

The only difference between the two versions is whether you have to find a way to get the maximum points.

Cirno drew a graph. This graph contains nodes, numbered through . Also:

  • For any and , node and node are connected.
  • For any and , node and node are connected.

Cirno called Daiyousei to come and play with her.

The rules for this game are as follows:

  • Firstly, Cirno chooses (i.e. half) of the nodes, and she colors them blue. The rest are left red.
  • Then there are turns: for each turn Cirno first chooses a blue node, and Daiyousei chooses a red node. If those two nodes are connected, Daiyousei gets a point.

Try to maximize the number of points Daiyousei gets.

输入格式

The first line contains an integer . Then one line below, numbers follow: they are the nodes that Cirno chose.

输出格式

For each test case, output an integer in a single line, which is the maximum number of points Daiyousei can get.

You don't have to output anything else in this version.

样例

样例输入 1

3
0 1 2 3 4 5

样例输出 1

6

数据范围与提示

Explanation

In the following picture, nodes in matrices are connected to each other. Cirno chose nodes .

Arrows below show a possible way for Daiyousei to get the maximum number of points she can get.

Constraints

.