Logo
(追記) (追記ここまで)

32477번 - Alien Attack 2 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 (추가 시간 없음) 1024 MB1811198765.909%

문제

Aliens are visiting Earth and, as usual, they plan to abduct humans for their experiments. In the past, alien abductions have caused a lot of press coverage and wild speculation on Earth. Luckily for them, most people do not believe these stories and think that aliens are not real.

In order to keep a low profile in the future, the Galactic Committee for Person Captures (GCPC) has established rules for abductions. Besides a lot of boring paperwork, the aliens have to prepare the abduction carefully. While they can make multiple trips (in fact, alien travel is so fast in practice that this is not a limitation at all), they must be smart about it so that their secret is not revealed to humans. If aliens want to abduct a person, they are required to abduct all of their friends at the same time, so that no one notices that their friend is missing when they want to hang out. Of course, friendships on planet Earth are bidirectional, that is if Alice is a friend of Bob, then Bob is also a friend of Alice.

In preparation for the trip, the aliens have observed their targets and started taking note of all their friendships. In total, they must abduct $n$ people, including their friends. Now, they want to book a starship at their local dealership and wonder how much space they need to abduct all $n$ people. A starship's storage space is measured in terms of the number of people that can be transported simultaneously. What is the minimum storage space required to abduct all $n$ people?

입력

The input consists of:

  • One line with two integers $n$ and $m$ (1ドル\leq n\leq 2 \cdot 10^5,ドル 0ドル\leq m\leq 2 \cdot 10^5$), the number of people and the total number of friendships between them.
  • $m$ lines, each with two integers $i$ and $j$ (1ドル\leq i < j\leq n$), denoting a friendship between persons $i$ and $j$.

The people are numbered from 1ドル$ to $n$. It is guaranteed that no friendship is listed multiple times.

출력

Output the minimum storage space needed to abduct all people.

제한

예제 입력 1

5 3
1 2
2 3
4 5

예제 출력 1

3

예제 입력 2

3 0

예제 출력 2

1

예제 입력 3

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

예제 출력 3

8

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > German Collegiate Programming Contest > GCPC 2024 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /