DAY 3 simulation game

T1

Total loss compression

First read all the strings, and according to the length from small to large, then a a compressed (a, b, c, ..., z, aa, ab ... this way)

T2

An outward tree (refer to from all sides root out), plus a side, let him find out this edge number as large as possible

discuss

1. Who knows the root to see if there is a 0-degree point

 Edges and lateral fork side throwback

 Is actually a case, the point is to have a degree of 2

 Border Erase twice to see even violence is not connected (directly greedy but I took the biggest, then 100à80)

2. the degree can not find a certain point a cycloalkyl à 0

 Remove any one on this side of the ring can be

    How to find the ring? BFS, disjoint-set, tarjan

T3

                                

 

 

First, k in fact there is no difference

N = 10, k = 5 and n = 2, k = 1 is the same as

Coming into the read n n / k (on rounding), k becomes 1

Give you a number, I asked a number of additional

By meter? ? ?

1. Burst search

Memory can be added of f [i] [j] indicates there are a i, b j is the probability that there are many

Finally seeking f [n] [n]

F[0][j]=1,f[i][0]=0,f[0][0]=0.5

转移  f[i][j]=0.25*(f[i-4][j]+f[i-3][j-1]+f[i-2][j-2]+f[i-1][j-1)  70pts

Complexity n ^ 2

Playing table: n grows, the probability is growing

There are: The answer is only required to retain six decimal places

So, when n>? Only when the output of 1.000000? ? ? ? ? ?

What metaphysics thing? ? ? ?

Guess you like

Origin www.cnblogs.com/lcezych/p/11620405.html