摘要:链接:http://codeforces.com/contest/743/problem/D 题意: 给定n个结点的树的每个结点的权值,让你找到两个不相交的子树的最大权值和;1为根节点; 题解: 首先了解一下子树的概念,百度一下就出来了。考虑以u为根结点的子树的最大权值,两种情况: 1.包含u的时候
阅读全文
摘要:Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11997 Accepted Submission(s): 5056 Probl
阅读全文
摘要:Vases and Flowers Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 3263 Accepted Submission(s): 12
阅读全文
摘要:点击查看详情——《IJCAI 2017 口碑商家客流量预测大赛》 漫步校园 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4205 Accept
阅读全文
摘要: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
阅读全文
摘要:Lotus and Horticulture Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 698 Accepted Submission(
阅读全文
摘要: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
阅读全文
摘要:1015: [JSOI2008]星球大战starwar Description 很久以前,在一个遥远的星系,一个黑暗的帝国靠着它的超级武器统治者整个星系。某一天,凭着一个偶然的 机遇,一支反抗军摧毁了帝国的超级武器,并攻下了星系中几乎所有的星球。这些星球通过特殊的以太隧道互相直 接或间接地连接。 但
阅读全文
摘要:1011: [HNOI2008]遥远的行星 Description 直线上N颗行星,X=i处有行星i,行星J受到行星I的作用力,当且仅当i<=AJ.此时J受到作用力的大小为 Fi->j= Mi*Mj/(j-i) 其中A为很小的常量,故直观上说每颗行星都只受到距离遥远的行星的作用。请计算每颗行星的受力
阅读全文