# 分类存档: hdu

## HDU 1251 解题报告

http://acm.hdu.edu.cn/showproblem.php?pid=1251

## 统计难题

Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)

### Problem Description

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

## HDU 1247 解题报告

http://acm.hdu.edu.cn/showproblem.php?pid=1247

## Hat’s Words

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)

### Problem Description

A hat's word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.
You are to find all the hat's words in a dictionary.

### Input

Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will be no more than 50,000 words.

Only one case.

### Output

Your output should contain all the hat’s words, one per line, in alphabetical order.

## HDU 3351解题报告

### Problem Description

I’m out of stories. For years I’ve been writing stories, some rather silly, just to make simple problems look difficult and complex problems look easy. But, alas, not for this one.
You’re given a non empty string made in its entirety from opening and closing braces. Your task is to find the minimum number of “operations” needed to make the string stable. The definition for being stable is as follows:
1. An empty string is stable.
2. If S is stable, then {S} is also stable.
3. If S and T are both stable, then ST (the concatenation of the two) is also stable.