포럼
문제 ICPC00324

I. Inquiry II

설명

For an undirected, simple graph \(G = (V, E)\) we call a subset \(V' \subseteq V\) an independent set if no two elements of \(V'\) are connected by an edge. An independent set of \(G\) is called a maximum independent set if there is no independent set in \(G\) with strictly more vertices. Given a specific kind of connected graph \(G\), find the size of a maximum independent set of \(G\).

제약
입력 형식
  • The input starts with one line, containing integers \(n\) ($1 \leq n
    \leq 100\(), the\ number\ of\ vertices\ in\ the\ graph, and \)m\( (\)n-1
    \leq m \leq n + 15$), the number of edges in the graph.
  • Then follow \(m\) lines, each containing integers \(a, b\) ($1 \leq a,
    b \leq n\() indicating\ that\ there\ is\ an\ edge\ between\ vertices \)a\( and \)b$.

The graph given by this input is guaranteed to be both simple and connected: there is at most one edge between each pair of vertices, there are no loops, and there is a path between each pair of vertices.

출력 형식
  • Output the number of vertices in a maximum independent set of the input graph.
예제 1
입력
2 1
1 2
출력
1
예제 2
입력
4 5
1 2
2 3
3 4
4 1
1 3
출력
2
문제 정보

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

출처 ICPC BAPC 2019

평가 및 의견

I. Inquiry II

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

Log in to rate problems.

개별 의견

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

풀이 제출

I. Inquiry II

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