摘要:链接:http://codeforces.com/contest/743/problem/D 题意: 给定n个结点的树的每个结点的权值,让你找到两个不相交的子树的最大权值和;1为根节点; 题解: 首先了解一下子树的概念,百度一下就出来了。考虑以u为根结点的子树的最大权值,两种情况: 1.包含u的时候
阅读全文
摘要:D. Mahmoud and a Dictionary time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud want
阅读全文
摘要:C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Mahmoud and
阅读全文
摘要:B. Mahmoud and a Triangle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud has n
阅读全文
摘要:C. Timofey and a tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Each New Year Timo
阅读全文
摘要:C. Nikita and stack time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Nikita and stack
阅读全文
摘要:D. Little Girl and Maximum XOR time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A little
阅读全文
摘要:A. Meeting of Old Friends time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today an outsta
阅读全文
摘要:C. New Year Snowmen time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As meticulous Gerald
阅读全文
摘要:A. New Year Table time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. New Year Table time
阅读全文
摘要:D - Babaei and Birthday Cake Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 629D D - Babaei a
阅读全文
摘要:D. Remainders Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Remainders Game tim
阅读全文
摘要:C. NP-Hard Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. NP-Hard Problem ti
阅读全文
摘要:题目链接:http://codeforces.com/contest/670/problem/C
阅读全文
摘要:题目链接:http://codeforces.com/contest/676/problem/C 1 #include <iostream> 2 #include <deque> 3 #include <string> 4 5 using namespace std; 6 /************
阅读全文
摘要:#include #include using namespace std; /******************************************************************************************************************* 贪心:排序,水过去...
阅读全文
摘要:#include #define MAX 1010 using namespace std; /******************************************************************************************************************** 最大的矩形四个顶点肯定不是危险; ...
阅读全文
摘要:#include #include using namespace std; /**************************************************************************************************************** 题意: 给你一个图...
阅读全文