当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1130:How Many Trees?

题目描述
A binary search tree is a binary tree with root k such that any node v reachable from its left has label (v) <label (k) and any node w reachable from its right has label (w) > label (k). It is a search structure which can find a node with label x in O(n log n) average time, where n is the size of the tree (number of vertices).

Given a number n, can you tell how many different binary search trees may be constructed with a set of numbers of size n such that each element of the set will be associated to the label of exactly one node in a binary search tree?
输入解释
The input will contain a number 1 <= i <= 100 per line representing the number of elements of the set.
输出解释
You have to print a line in the output for each entry with the answer to the previous question.
输入样例
1
2
3
输出样例
1
2
5
来自杭电HDUOJ的附加信息
Recommend Eddy

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 UVA

源链接: HDU-1130

最后修改于 2020-10-25T22:42:24+00:00 由爬虫自动更新

共提交 1

通过率 0.0%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)