영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)
시간 제한 1초 · 메모리 제한 512 MB
Problem
A group of n children are coming to Helsinki. There are two possible attractions: a child can visit either Korkeasaari (zoo) or Linnanmäki (amusement park).
There are m pairs of children who want to visit the same attraction. Your task is to find all possible alternatives for the number of children that will visit Korkeasaari. The children's wishes have to be taken into account.
Input
The first input line has two integers n and m: the number of children and their wishes. The children are numbered 1,2,…,n.
After this, there are m lines describing the children's wishes. Each line has two integers a and b: children a and b want to visit the same attraction.
Output
Print a bit string of length n where a one-bit at index i indicates that it is possible that exactly i children visit Korkeasaari (the bit string is to be considered one-indexed).
Constraints
- 1 ≤ n ≤ 10^5
- 0 ≤ m ≤ 10^5
- 1 ≤ a,b ≤ n
Example
Explanation: The number of children visiting Korkeasaari can be 1, 4 or 5.
예제
예제 1
5 3 1 2 2 3 1 5
10011