색칠하기

Problem

https://www.acmicpc.net/problem/13265

Idea

edge 끝 두 vertex가 서로 색깔이 달라야 한다(이분 그래프).
주의점은 그래프가 끊겨있을 수 (비연결)있어 모든 정점을 체크해야함