{"problem":{"name":"Driving on a Tree","description":{"content":"There is an undirected connected graph with $N$ vertices and $N-1$ edges. The $i$\\-th edge connects $u_i$ and $v_i$.      E869120 the coder moves in the graph as follows:   *   He move to adjacent ve","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"s8pc_4_d"},"statements":[{"statement_type":"Markdown","content":"There is an undirected connected graph with $N$ vertices and $N-1$ edges. The $i$\\-th edge connects $u_i$ and $v_i$.  \n  \nE869120 the coder moves in the graph as follows:  \n\n*   He move to adjacent vertex, but he can't a visit vertex two or more times.\n*   He ends move when there is no way to move.\n*   Otherwise, he moves randomly. (equal probability) If he has $p$ way to move this turn, he choose each vertex with $1/p$ probability.\n\n![image](https://atcoder.jp/img/s8pc-4/5973dad11843e9098d9225dd431c9084.png)\n\nCalculate the expected value of the number of turns, when E869120 starts from vertex $i$, for all $i (1 ≤ i ≤ N)$.\n\n## Input\n\nThe input is given from standard input in the following format.  \n  \n\n$N$\n$u_1$ $v_1$\n$u_2$ $v_2$\n :\n$u_{N-1}$ $v_{N-1}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"s8pc_4_d","tags":[],"sample_group":[],"created_at":"2026-03-03 11:01:14"}}