摘要: 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 @ 2018-09-03 12:58 一无所知小白龙 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Mike and !Mike are old childhood rivals, they are opposite in everything they do, except programming. Today they have a problem they cannot solve on t 阅读全文
posted @ 2018-09-03 12:56 一无所知小白龙 阅读(230) 评论(0) 推荐(1) 编辑
摘要: Tom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has a ability. Now, Tom is g 阅读全文
posted @ 2018-09-03 12:47 一无所知小白龙 阅读(198) 评论(0) 推荐(0) 编辑
摘要: In Land waterless, water is a very limited resource. People always fight for the biggest source of water. Given a sequence of water sources with a1,a2 阅读全文
posted @ 2018-09-03 12:36 一无所知小白龙 阅读(576) 评论(0) 推荐(0) 编辑
摘要: Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ances 阅读全文
posted @ 2018-09-03 12:23 一无所知小白龙 阅读(185) 评论(0) 推荐(0) 编辑