# [HDU5469]Antonidas（点分治，字符串Hash）

### Description

Given a tree with N vertices and N−1 edges. Each vertex has a single letter Ci. Given a string S, you are to choose two vertices A and B, and make sure the letters catenated on the shortest path from A to B is exactly S. Now, would you mind telling me whether the path exists?

HDU

HNCJ OIer 一枚