上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 题目描述 Description Before bridges were common, ferries were used to transport cars across rivers. River ferries, unlike their larger cousins, run on a g 阅读全文
posted @ 2017-07-08 15:27 小飞淙的云端 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 给出一个N个点的树,找出一个点来,以这个点为根的树时,所有点的深度之和最大 输入描述 Input Description 给出一个数字N,代表有N个点.N<=1000000 下面N-1条边. 输出描述 Output Description 输出你所找到的点,如果具有 阅读全文
posted @ 2017-07-08 10:17 小飞淙的云端 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 一棵二叉树可以按照如下规则表示成一个由0、1、2组成的字符序列,我们称之为“二叉树序列S”: |-0 表示该树没有子节点 S = |-1S1 表示该树有一个子节点,S1为其子树的二叉树排列 |- 2S1S2 表示该树有连个个子节点,S1、S2为其子树的二叉树排列 你 阅读全文
posted @ 2017-06-28 17:44 小飞淙的云端 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of on 阅读全文
posted @ 2017-06-25 23:20 小飞淙的云端 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 松鼠的新家是一棵树,前几天刚刚装修了新家,新家有n个房间,并且有n-1根树枝连接,每个房间都可以相互到达,且俩个房间之间的路线都是唯一的。天哪,他居然真的住在“树”上。松鼠想邀请****前来参观,并且还指定一份参观指南,他希望**能够按照他的指南顺序,先去a1,再去 阅读全文
posted @ 2017-06-25 22:57 小飞淙的云端 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled 阅读全文
posted @ 2017-06-21 18:39 小飞淙的云端 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description Xaviera现在遇到了一个有趣的问题。平面上有N个点,Xaviera想找出周长最小的三角形。由于点非常多,分布也非常乱,所以Xaviera想请你来解决这个问题。为了减小问题的难度,这里的三角形也包括共线的三点。 输入描述 Input Description 第一行 阅读全文
posted @ 2017-06-21 18:31 小飞淙的云端 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can 阅读全文
posted @ 2017-06-21 18:20 小飞淙的云端 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description Once upon a time, there was a traveler. He plans to travel using stagecoaches (horse wagons). His starting point and destination are 阅读全文
posted @ 2017-06-21 18:14 小飞淙的云端 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is 阅读全文
posted @ 2017-06-21 18:06 小飞淙的云端 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页