- 博客(19)
- 资源 (2)
- 收藏
- 关注
原创 HiHoCoder_#1175 : 拓扑排序·二
#1175 : 拓扑排序·二时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho所在学校的校园网被黑客入侵并投放了病毒。这事在校内BBS上立刻引起了大家的讨论,当然小Hi和小Ho也参与到了其中。从大家各自了解的情况中,小Hi和小Ho整理得到了以下的信息:校园网主干是由N个节点(编号1..N)组成
2016-07-31 17:21:51
717
原创 HiHoCoder_#1174 : 拓扑排序·一
#1174 : 拓扑排序·一时间限制:10000ms单点时限:1000ms内存限制:256MB描述由于今天上课的老师讲的特别无聊,小Hi和小Ho偷偷地聊了起来。小Ho:小Hi,你这学期有选什么课么?小Hi:挺多的,比如XXX1,XXX2还有XXX3。本来想选YYY2的,但是好像没有先选过YYY1,不能选YYY2。小Ho:先
2016-07-31 15:45:23
626
原创 赛码网_在线编程_军训队列
军训队列题目描述某大学开学进行军训队列训练,将学生从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列剩下的依次向前靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的依次向前靠拢,继续从头开始进行一至二报数。。。以后每次从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。输入
2016-07-31 12:05:09
1947
原创 赛码网_在线编程_上台阶
上台阶题目描述有一楼梯共m级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第m级,共有多少走法?注:规定从一级到一级有0种走法。输入输入数据首先包含一个整数n(1样例输入223输出对于每个测试实例,请输出不同
2016-07-29 22:29:24
4265
原创 赛码网_在线编程_约会
约会题目描述Bob和Alice有个约会,一大早Bob就从点(0,0)出发,前往约会地点(a,b)。Bob没有一点方向感,因此他每次都随机的向上下左右四个方向走一步。简而言之,如果Bob当前在(x,y),那么下一步他有可能到达(x+1,y), (x-1,y), (x,y+1), (x,y-1)。很显然,当他到达目的地的时候,已经很晚了,Alice早已离去。第二天,Alice质问B
2016-07-29 16:29:37
3168
原创 LeetCode#106. Construct Binary Tree from Inorder and Postorder Traversal
106. Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.c++代码1:/** * Definition for a binary tree node. * stru
2016-03-24 21:35:21
377
原创 LeetCode#105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in th
2016-03-24 21:32:39
302
原创 LeetCode#104. Maximum Depth of Binary Tree
104. Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
2016-03-24 21:19:29
370
原创 LeetCode#103. Binary Tree Zigzag Level Order Traversal My Submissions Question
103. Binary Tree Zigzag Level Order Traversal My Submissions QuestionTotal Accepted: 57077 Total Submissions: 201598 Difficulty: MediumGiven a binary tree, return the zigzag level order traversal
2016-03-24 21:15:30
322
原创 LeetCode#102. Binary Tree Level Order Traversal My Submissions Question
102. Binary Tree Level Order Traversal My Submissions QuestionTotal Accepted: 96217 Total Submissions: 297797 Difficulty: EasyGiven a binary tree, return the level order traversal of its nodes' va
2016-03-24 21:13:30
301
原创 LeetCode#101. Symmetric Tree
101. Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ /
2016-03-24 21:06:35
398
原创 LeetCode#334. Increasing Triplet Subsequence
334. Increasing Triplet SubsequenceGiven an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.Formally the function should:Return true if t
2016-03-23 14:19:10
360
原创 LeetCode#338. Counting Bits
338. Counting Bits题目:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.
2016-03-23 11:25:28
316
原创 LeetCode#120. Triangle
120. TriangleTotal Accepted: 65067 Total Submissions: 219220 Difficulty: MediumGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the r
2016-03-16 13:21:42
297
原创 LeetCode#337. House Robber III
337. House Robber IIITotal Accepted: 2052 Total Submissions: 5607 Difficulty: MediumThe thief has found himself a new place for his thievery again. There is only one entrance to this area, calle
2016-03-16 12:56:53
310
原创 LeetCode#213. House Robber II
213. House Robber IITotal Accepted: 23996 Total Submissions: 80010 Difficulty: MediumNote: This is an extension of House Robber.After robbing those houses on that street, the thief has found
2016-03-16 12:16:44
406
原创 LeetCode#198. House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house
2016-03-16 11:32:55
359
第三章_搜索策略-1.ppt
2013-04-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人