随笔分类 - 图论--搜索
搜索问题
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 Problem Description Nowadays princess Claire wants one more guard and posts the ads throughout the kingdom. For her unparalleled beauty, generali
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 Problem Description In mathematics, the four color theorem, or the four color map theorem, states that, given any separation of a plane into cont
阅读全文
摘要:题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4920 problem description Two years ago, Pu
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接 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
阅读全文
摘要:题目链接: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
阅读全文

浙公网安备 33010602011771号