Edge Addition

All submissions for this problem are available.
###Read problems statements [Hindi](http://www.codechef.com/download/translated/DEC18/hindi/BICONT.pdf) , [Vietnamese](http://www.codechef.com/download/translated/DEC18/vietnamese/BICONT.pdf) , [Mandarin Chinese](http://www.codechef.com/download/translated/DEC18/mandarin/BICONT.pdf) , [Russian](http://www.codechef.com/download/translated/DEC18/russian/BICONT.pdf) and [Bengali](http://www.codechef.com/download/translated/DEC18/bengali/BICONT.pdf) as well. You are given a tree with $N$ nodes. For each unordered pair of distinct nodes $(i, j)$ such that there is no edge between nodes $i$ and $j$, we add an edge between these nodes with probability $1/2$. For each $i$ ($1 \le i \le N$), let $p_i$ be the probability that the resulting graph has exactly $i$ 2edgeconnected components and let $R_i = p_i \cdot 2^{(N1)(N2)/2}$. You should compute $R_i$ modulo $10^9+7$ for each $i$ from $1$ to $N$. ### Input  The first line of the input contains a single integer $N$.  Each of the next $N1$ lines contains two spaceseparated integers $u$ and $v$ denoting an edge between vertices $u$ and $v$. ### Output Print a single line containing $N$ spaceseparated integers $R_1, R_2, \dots, R_N$. ### Constraints  $1 \le N \le 200$ ### Subtasks **Subtask #1 (10 points):** $1 \le N \le 20$ **Subtask #2 (90 points):** original constraints ### Example Input ``` 3 1 2 2 3 ``` ### Example Output ``` 1 0 1 ``` ### Explanation The only edge that can be added is $(1, 3)$. If this edge is added, there will be one biconnected component; otherwise, there will be three biconnected components. Therefore, $p_1 = p_3 = 1/2$ and $p_2 = 0$.Author:  jtnydv25 
Tags  jtnydv25 
Date Added:  19112018 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, COB, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 