# One-Dimensional Maze （2017CCPC秦皇岛站）

BaoBao is trapped in a one-dimensional maze consisting of  grids arranged in a row! The grids are numbered from 1 to  from left to right, and the -th grid is marked with a character , where  is eit...

# Nearest Common Ancestors UVALive – 2525 （倍增计算LCA）

A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node ...

# 统计难题 HDU – 1251（迷之测试数据）

Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).   Input 输...

# 博客启用LaTeX排版支持

THIS IS A TEST FOR LaTeX    $e=m c^2$ $$\begin{pmatrix} a_{11} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots\\ a_{m1} & \cdots & a_{mn} \end{pmatrix}$$   HO...

# Just a Hook HDU – 1698 (线段树的区间更新)

Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the s...