포럼
문제 ICPC00381

A. Alien Attack 2

설명

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
출력
3
예제 2
입력
3 0
출력
1
예제 3
입력
8 8
1 2
2 3
3 4
1 4
1 5
2 6
3 7
4 8
출력
8
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC GCPC 2024

평가 및 의견

A. Alien Attack 2

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

A. Alien Attack 2

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8