随笔分类 - 搜索 DFS
摘要:2115: [Wc2011] Xor Description Input 第一行包含两个整数N和 M, 表示该无向图中点的数目与边的数目。 接下来M 行描述 M 条边,每行三个整数Si,Ti ,Di,表示 Si 与Ti之间存在 一条权值为 Di的无向边。 图中可能有重边或自环。 第一行包含两个整数N
阅读全文
摘要:Matching In Multiplication Problem DescriptionIn the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divid
阅读全文
摘要:Ba Gua Zhen Problem Description During the Three-Kingdom period, there was a general named Xun Lu who belonged to Kingdom Wu. Once his troop were chas
阅读全文
摘要:The war Problem Description In the war, the intelligence about the enemy is very important. Now, our troop has mastered the situation of the enemy's w
阅读全文
摘要:题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4896 We want to have a great SWERC at Por
阅读全文
摘要:题目链接: http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=701 1001 : 矩阵快速幂 #include <iostream> #include <algorithm> #include <cstdio> #include <
阅读全文
摘要:很久很久之前,森林里住着一群兔子。有一天,兔子们突然决定要去看樱花。兔子们所在森林里的樱花树很特殊。樱花树由n个树枝分叉点组成,编号从0到n-1,这n个分叉点由n-1个树枝连接,我们可以把它看成一个有根树结构,其中0号节点是根节点。这个树的每个节点上都会有一些樱花,其中第i个节点有c_i朵樱花。樱花
阅读全文
摘要:在 W 星球上有 n 个国家。为了各自国家的经济发展,他们决定在各个国家之间建设双向道路使得国家之间连通。但是每个国家的国王都很吝啬,他们只愿意修建恰好 n – 1条双向道路。 每条道路的修建都要付出一定的费用, 这个费用等于道路长度乘以道路两端的国家个数之差的绝对值。例如,在下图中,虚线所示道路两
阅读全文
摘要:F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ...
阅读全文
摘要:B. Longtail HedgehogThis Christmas Santa gave Masha a magic picture and a pencil. The picture consists ofnpoints connected bymsegments (they might cro...
阅读全文
摘要:N friends go to the local super market together. The probability of their buying something from themarket is p1, p2, p3, . . . , pN respectively. Afte...
阅读全文
摘要:Subtrees问题描述一棵有N个节点的完全二叉树,问有多少种子树所包含的节点数量不同。输入描述输入有多组数据,不超过1000组.每组数据输入一行包含一个整数N.(1\leq N\leq {10}^{18})(1≤N≤1018)输出描述对于每组数据输出一行,表示不同节点数的子树有多少种.输入样...
阅读全文
摘要:G - Ancient GoDescriptionYu Zhou likes to play Go with Su Lu. From the historical research, we found that there are much difference on the rules betwe...
阅读全文
摘要:Stealing Harry Potter's PreciousProblem Description Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwa...
阅读全文
摘要:GT and setAccepts: 35Submissions: 194Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述有NN个集合,每个集合中有A_iAi个数。你要将这NN...
阅读全文
摘要:A very hard Aoshu problem Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description...
阅读全文
摘要:Problem E: Reliable NetsYou’re in charge of designing a campus network between buildings and are very worried about itsreliability and its cost. So, y...
阅读全文
摘要:Problem H: Two EndsIn the two-player game “Two Ends”, an even number of cards is laid out in a row. On each card, faceup, is written a positive intege...
阅读全文
摘要:2783: [JLOI2012]树Time Limit:1 SecMemory Limit:128 MBSubmit:588Solved:347Description数列提交文件:sequence.pas/c/cpp输入文件:sequence.in输出文件:sequence.out问题描述:把一个正...
阅读全文
摘要:Problem A. Poetry ChallengeTime Limit: 1 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100500/attachmentsDescriptionLet’s check another challen...
阅读全文

浙公网安备 33010602011771号