80 analog solution to a problem

A. Bell number

The range of data, it seems clear that the matrix is ​​fast power.

Modulo each prime factor decomposition will find the quality factor is small, and only appears once.

So consider the results obtained $ mod $ for each quality factor and $ crt $ merger.

Bell has been given the title number of a formula in the mold $ p $ significance,

So directly save $ p $ th Bell number, matrix quick power transfer on it.

 

 

 

B. crossing the square

At first I thought some ways similar Cartland number of $ dp $ + enumerate the overlapping portions.

And then found deduplication does not seem simple, then gave up.

Then thought were transferred by $ dp $ $ kmp $, and then found ten test still make life difficult.

Then think of the $ AC $ automaton $ dp $ metastasis.

Provided $ dp (i, j, k, 0 / 1,0 / 1) $ $ I $ denotes the node, selected from the J $ a $ 0, $ k $ a 1, through the string 1 matches, whether the string 2 matches too.

They were selected and options $ $ 0 $ 1 $ transfer it.

 

 

 

C. dance night

The problem is that the largest possible bipartite graph matching edge set.

Violent approach is to delete every edge and then continue

Guess you like

Origin www.cnblogs.com/skyh/p/11708375.html