You are given a tree A of n nodes.There are m queries.In each query,you are given a tree B of m nodes and you have to answer how many connected subgraphs of A is isomorphic to B.Because the answer may be too large,you only need to output it modulo 109+710^9+7109+7 .
You are given a tree A of n nodes.There are m queries.In each query,you are given a tree B of m nodes and you have to answer how many connected subgraphs of A is isomorphic to B.Because the answer may be too large,you only need to output it modulo 109+710^9+7109+7 .
(图片来源网络,侵删)
标签: HBC50914连分数 递归tree题解