YunYan

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年8月8日

摘要: 直接上例题: HDU2544 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M( 阅读全文
posted @ 2019-08-08 22:52 Target--fly 阅读(163) 评论(0) 推荐(0)

摘要: A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with 阅读全文
posted @ 2019-08-08 19:29 Target--fly 阅读(233) 评论(0) 推荐(0)

摘要: There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文
posted @ 2019-08-08 19:27 Target--fly 阅读(145) 评论(0) 推荐(0)

摘要: Language: Default Closest Common Ancestors Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 24653 Accepted: 7648 Description Write a program 阅读全文
posted @ 2019-08-08 17:39 Target--fly 阅读(133) 评论(0) 推荐(0)

摘要: 例题:http://poj.org/problem?id=1986 POJ1986 Distance Queries Language: Default Distance Queries Time Limit: 2000MS Memory Limit: 30000K Total Submission 阅读全文
posted @ 2019-08-08 16:49 Target--fly 阅读(322) 评论(0) 推荐(0)

摘要: https://www.luogu.org/problemnew/solution/P3379 LCA叫做最短公共祖先,用来求距离树上两个节点最近的公共点; 常用倍增算法: 阅读全文
posted @ 2019-08-08 16:46 Target--fly 阅读(322) 评论(0) 推荐(0)