随笔分类 - 搜索 DFS
摘要:E. Mahmoud and a xor trip 题目连接: http://codeforces.com/contest/766/problem/E Description Mahmoud and Ehab live in a country with n cities numbered from
阅读全文
摘要:J 皇后像廣場 题目连接: http://acm.hust.edu.cn/vjudge/contest/123332 problem/J Description Vova was walking along the Statue Square (皇后像廣場) in Hong Kong, when h
阅读全文
摘要:You’ll be Working on the Railroad 题目连接: http://codeforces.com/gym/100646/attachments Description Congratulations! Your county has just won a state gra
阅读全文
摘要:Necklace/center 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5727 Description SJX has 2 N magic gems. N of them have Yin energy inside while others
阅读全文
摘要:4602: [Sdoi2016]齿轮 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4602 Description 现有一个传动系统,包含了N个组合齿轮和M个链条。每一个链条连接了两个组合齿轮u和v,并提供了一个传动比x : y。即如果
阅读全文
摘要:B. Kay and Snowflake 题目连接: http://www.codeforces.com/contest/685/problem/B Description After the piece of a devilish mirror hit the Kay's eye, he is n
阅读全文
摘要:A. Help Farmer 题目连接: http://www.codeforces.com/contest/142/problem/A Description Once upon a time in the Kingdom of Far Far Away lived Sam the Farmer.
阅读全文
摘要:E. Bear and Square Grid 题目连接: http://www.codeforces.com/contest/680/problem/E Description You have a grid with n rows and n columns. Each cell is eith
阅读全文
摘要:D. Bear and Tower of Cubes 题目连接: http://www.codeforces.com/contest/680/problem/D Description Limak is a little polar bear. He plays by building towers
阅读全文
摘要:2474 Balloons in a Box 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=99999999&page=show_problem&category=36&problem
阅读全文
摘要:A. Maze 题目连接: http://codeforces.com/contest/377/problem/A Description Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell i
阅读全文
摘要:C. Old Berland Language 题目连接: http://www.codeforces.com/contest/37/problem/C Description Berland scientists know that the Old Berland language had exa
阅读全文
摘要:C. Hexadecimal's Numbers 题目连接: http://www.codeforces.com/contest/9/problem/C Description One beautiful July morning a terrible thing happened in Mainf
阅读全文
摘要:D. Lizards and Basements 2 题目连接: http://codeforces.com/contest/6/problem/D Description This is simplified version of the problem used on the original
阅读全文
摘要:E. New Reform 题目连接: http://www.codeforces.com/contest/659/problem/E Description Berland has n cities connected by m bidirectional roads. No road conne
阅读全文
摘要:C. Road Improvement 题目连接: http://www.codeforces.com/contest/638/problem/C Description In Berland there are n cities and n 1 bidirectional roads. Each
阅读全文
摘要:Friends 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5305 Description There are n people and m pairs of friends. For every pair of friends, they ca
阅读全文
摘要:1053: [HAOI2007]反素数ant 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=1053 Description 对于任何正整数x,其约数的个数记作g(x)。例如g(1)=1、g(6)=4。 如果某个正整数x满足:g(x) g
阅读全文
摘要:<center 联合权值</center 题目连接:http://codevs.cn/problem/3728/ Description给一棵树,然后每相距离为2的点都会产生一个联合权值,等于Wa Wb问你联合权值最大的是多少,所有联合权值的和是多少 Input第一行nn 1行 x y 表示xy...
阅读全文
摘要:B. New Year and Old Property 题目连接: http://www.codeforces.com/contest/611/problem/B Description The year 2015 is almost over. Limak is a little polar b
阅读全文