题目描述
Professor Alex will organize students to attend an academic conference.
Alex 教授将要组织学生参加学术会议。
Alex has n excellent students, and he decides to select some of them (possibly none) to attend the conference. They form a group. Some pairs of them are friends.
Alex 有 n 个很好的的学生,他决定选一些(也可能不选)让他们去开会,他们组成了一个小组,有些学生两两是朋友。
The friendly value of the group is initially 0. For each couple of friends (x,y), if both of them attend the conference, the friendly value of the group will increase 1, and if only one of them attends the conference, the friendly value of the group will decrease 1. If k students attend the conference, the friendly value of the group will decrease k.
小组的 “友爱值” 初始是 0,对于每一对好朋友 (x,y),如果他们都参加会议了,“友爱值” 就会增加 1,如果一对好朋友只有一个人去参加会议,友爱值就会减少 1。如果有 k 个学生参加了会议,友爱值会减少 k 。
Alex wants to make the group more friendly. Please output the maximum friendly value