思考题 for everyone

# Man on Graph

Given a graph of N nodes and M edges. On node i there are

Given q queries:

1. "1 x y" set the number of people in X to be Y

2. "2" find the expected number of people left after moving.

Proceed the queries.

Test 1(8%) - the graph is a tree,

Test 2(8%) - the graph is a tree,

Test 3(8%) - the graph is a tree,q=1,N=1e5,M=1e5

Test 4(8%) - the graph is a tree,

Test 5(8%) - the graph is a tree,N=1000,M=1000,q=1000

Test 6(10%) - the graph is a tree,N=1e5,M=1e5,q=1e5

Test 7(8%) -

Test 8(8%) -

Test 9(8%) - q=1,N=1e5,M=1e5

Test 10(8%) -

Test 11(8%) - N=1000,M=1000,q=1000

Test 12(10%) - N=1e5,M=1e5,q=1e5

**Orange boy come and AC quickly**