Best Cow Line
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 11230
Accepted: 3329
Description
FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the an...
分类:
其他好文 时间:
2015-01-22 13:24:57
阅读次数:
157
Catch That Cow
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 49988
Accepted: 15679
Description
Farmer John has been informed of the location of a fugit...
分类:
其他好文 时间:
2015-01-21 22:38:55
阅读次数:
259
Dining
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 9938
Accepted: 4567
Description
Cows are such finicky eaters. Each cow has a preference for certai...
分类:
编程语言 时间:
2015-01-19 09:22:19
阅读次数:
208
下面是今天的题解链接,感觉写的还是很详细的,有什么问题可以找我,大家一起探讨~~~
A - MPI Maelstrom:
题解链接:MPI Maelstrom
B - Cow Hurdles:
题解链接:Cow
Hurdles
C - Wormholes:
题解链接:Wormholes
D - Frogger:
题解链接:Frogger...
分类:
其他好文 时间:
2015-01-18 21:08:40
阅读次数:
145
Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100...
分类:
其他好文 时间:
2015-01-16 12:57:44
阅读次数:
118
Description Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for co...
分类:
其他好文 时间:
2015-01-16 12:50:45
阅读次数:
183
Cow Hurdles
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 6142
Accepted: 2752
Description
Farmer John wants the cows to prepare for the county jumpin...
分类:
编程语言 时间:
2015-01-15 00:30:35
阅读次数:
247
方法1:递归方法:
(1)如果两个节点分别在根节点的左子树和右子树,则返回根节点
(2)如果两个节点都在左子树,则递归处理左子树;如果两个节点都在右子树,则递归处理右子树
bool FindNode(BTree* pRoot, BTree* pNode)
{
if (pRoot == NULL || pNode == NULL)
{
return false;
}
...
分类:
编程语言 时间:
2015-01-13 10:36:26
阅读次数:
231
判断完全二叉树:
完全二叉树,除最后一层外,每一层上的节点树都达到了最大值;在最后一层上只缺少右边的若干节点!
算法思路:
按层次(从上到下,从左到右)遍历二叉树,当遇到一个节点的左子树为空时,则该节点右子树必须为空,且后面遍历的节点左
右子树都必须为空,否则不是完全二叉树。
代码:
bool IsCompleteBTree(BTree* pRoot)
{
if (pRoot =...
分类:
编程语言 时间:
2015-01-12 13:06:28
阅读次数:
475