AT_abc442_c [ABC442C] Peer Review

Description

There are $ N $ researchers, numbered $ 1, 2, \ldots, N $ . There are $ M $ conflicts of interest among the researchers; for $ i = 1, 2, \ldots, M $ , researchers $ A_i $ and $ B_i $ have a conflict of interest with each other. The reviewers of a paper must be three distinct researchers who are different from the author of the paper and have no conflict of interest with the author. For $ i = 1, 2, \ldots, N $ , solve the following problem: - Find the number of possible triples of reviewers for a paper authored by researcher $ i $ . Assume that all papers are single-authored.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ M $ $ A_1 $ $ B_1 $ $ A_2 $ $ B_2 $ $ \vdots $ $ A_M $ $ B_M $

Output Format

Print the answers for $ i = 1, 2, \ldots, N $ in this order, separated by spaces.

Explanation/Hint

### Sample Explanation 1 Below, we represent a set of researchers by the set of their numbers. - There are no possible triples of reviewers for a paper authored by researcher $ 1 $ . - The possible triple of reviewers for a paper authored by researcher $ 2 $ is $ \lbrace 4, 5, 6 \rbrace $ , which is $ 1 $ triple. - There are no possible triples of reviewers for a paper authored by researcher $ 3 $ . - The possible triples of reviewers for a paper authored by researcher $ 4 $ are $ \lbrace 2, 3, 5 \rbrace, \lbrace 2, 3, 6 \rbrace, \lbrace 2, 5, 6 \rbrace, \lbrace 3, 5, 6 \rbrace $ , which is $ 4 $ triples. - The possible triples of reviewers for a paper authored by researcher $ 5 $ are $ \lbrace 1, 2, 4 \rbrace, \lbrace 1, 2, 6 \rbrace, \lbrace 1, 4, 6 \rbrace, \lbrace 2, 4, 6 \rbrace $ , which is $ 4 $ triples. - The possible triples of reviewers for a paper authored by researcher $ 6 $ are $ \lbrace 1, 2, 3 \rbrace, \lbrace 1, 2, 4 \rbrace, \lbrace 1, 2, 5 \rbrace, \lbrace 1, 3, 4 \rbrace, \lbrace 1, 3, 5 \rbrace, \lbrace 1, 4, 5 \rbrace, \lbrace 2, 3, 4 \rbrace, \lbrace 2, 3, 5 \rbrace, \lbrace 2, 4, 5 \rbrace, \lbrace 3, 4, 5 \rbrace $ , which is $ 10 $ triples. ### Constraints - $ 1 \leq N \leq 2 \times 10^5 $ - $ 0 \leq M \leq 2 \times 10^5 $ - $ 1 \leq A_i, B_i \leq N $ - $ A_i \neq B_i $ - $ (A_i, B_i) \neq (A_j, B_j) $ if $ i \neq j $ . - $ (A_i, B_i) \neq (B_j, A_j) $ if $ i \neq j $ . - All input values are integers.