随笔分类 -  图论--搜索

搜索问题
摘要:题目链接 Problem Description As we all known, merge sort is an O(nlogn) comparison-based sorting algorithm. The merge sort achieves its good runtime by a 阅读全文
posted @ 2017-10-05 20:44 茶飘香~ 阅读(561) 评论(0) 推荐(0)
摘要:题目链接 Problem Description Bob wants to hold a race to encourage people to do sports. He has got trouble in choosing the route. There are N houses and N 阅读全文
posted @ 2017-10-04 19:44 茶飘香~ 阅读(339) 评论(0) 推荐(0)
摘要:题目链接 Problem Description Nowadays princess Claire wants one more guard and posts the ads throughout the kingdom. For her unparalleled beauty, generali 阅读全文
posted @ 2017-10-02 21:39 茶飘香~ 阅读(338) 评论(0) 推荐(0)
摘要:题目链接 problem description Little Ruins is a studious boy, recently he learned addition operation! He was rewarded some number bricks of 11 to 99 and in 阅读全文
posted @ 2017-10-01 20:21 茶飘香~ 阅读(346) 评论(0) 推荐(0)
摘要:题目链接 Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return stic 阅读全文
posted @ 2017-09-13 12:38 茶飘香~ 阅读(209) 评论(0) 推荐(0)
摘要:题目链接 Problem Description You are given a complete binary tree with n nodes. The root node is numbered 1, and node x's father node is ⌊x/2⌋. At the beg 阅读全文
posted @ 2017-09-01 19:42 茶飘香~ 阅读(284) 评论(0) 推荐(0)
摘要:题目链接 Problem Description Suppose that you are an admiral of a famous naval troop. Our naval forces have got 21 battleships. There are 6 types of battl 阅读全文
posted @ 2017-08-29 14:19 茶飘香~ 阅读(237) 评论(0) 推荐(0)
摘要:题目链接 Problem Description HazelFan wants to build a rooted tree. The tree has n nodes labeled 0 to n−1, and the father of the node labeled i is the nod 阅读全文
posted @ 2017-08-15 21:04 茶飘香~ 阅读(318) 评论(0) 推荐(0)
摘要:题目链接 Problem Description As to a permutation p1,p2,⋯,pn from 1 to n, it is uncomplicated for each 1≤i≤n to calculate (li,ri) meeting the condition tha 阅读全文
posted @ 2017-07-30 11:16 茶飘香~ 阅读(507) 评论(0) 推荐(0)
摘要:题目链接 Problem Description There is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci.Th 阅读全文
posted @ 2017-07-30 10:36 茶飘香~ 阅读(397) 评论(0) 推荐(0)
摘要:题目链接 Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could 阅读全文
posted @ 2017-07-27 19:31 茶飘香~ 阅读(302) 评论(0) 推荐(0)
摘要:题目链接 Problem Description You are a rich person, and you think your wallet is too heavy and full now. So you want to give me some money by buying a lov 阅读全文
posted @ 2017-07-18 22:01 茶飘香~ 阅读(424) 评论(0) 推荐(0)
摘要:题目链接 DESCRIPTION INPUT 题目链接 DESCRIPTION INPUT INPUT INPUT OUTPUT OUTPUT SAMPLE INPUT 1 4 2 1 2 5 2 3 5 3 4 5 5 5 SAMPLE INPUT 1 4 2 1 2 5 2 3 5 3 4 5 阅读全文
posted @ 2017-07-16 21:21 茶飘香~ 阅读(473) 评论(0) 推荐(0)
摘要:题目链接 Problem Description In mathematics, the four color theorem, or the four color map theorem, states that, given any separation of a plane into cont 阅读全文
posted @ 2017-06-25 20:47 茶飘香~ 阅读(428) 评论(0) 推荐(0)
摘要:题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4920 problem description Two years ago, Pu 阅读全文
posted @ 2016-10-26 21:42 茶飘香~ 阅读(326) 评论(0) 推荐(0)
摘要:题目链接 https://acm.bnu.edu.cn/v3/problem_show.php?pid=52310 problem description Define the depth of a node in a rooted tree by applying the following ru 阅读全文
posted @ 2016-10-03 19:52 茶飘香~ 阅读(587) 评论(0) 推荐(0)
摘要:题目链接 https://acm.bnu.edu.cn/v3/problem_show.php?pid=52305 problem description In ICPCCamp, there are n cities and (n−1) (bidirectional) roads between 阅读全文
posted @ 2016-10-02 20:56 茶飘香~ 阅读(652) 评论(2) 推荐(2)
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5877 Problem Description You are given a rooted tree of N nodes, labeled from 1 to N. To the ith 阅读全文
posted @ 2016-09-10 19:11 茶飘香~ 阅读(488) 评论(0) 推荐(0)
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5379 Problem Description Little sun is an artist. Today he is playing mahjong alone. He suddenly 阅读全文
posted @ 2016-08-30 20:28 茶飘香~ 阅读(186) 评论(0) 推荐(0)
摘要:题目链接:HDU 5355 http://acm.split.hdu.edu.cn/showproblem.php?pid=5355 Problem Description There are m soda and today is their birthday. The 1-st soda has 阅读全文
posted @ 2016-08-30 11:02 茶飘香~ 阅读(183) 评论(0) 推荐(0)