摘要:
Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionJack likes to travel around the world, but he doe... 阅读全文
摘要:
Time Limit: 1500/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionBetty owns a lot of ponds, some of them are connec... 阅读全文
摘要:
Problem DescriptionPrincess Alisha invites her friends to come to her birthday party. Each of her friends will bring a gift of some valuev, and all of... 阅读全文
摘要:
User ainta has a permutationp1, p2, ..., pn. As the New Year is coming, he wants to make his permutation as pretty as possible.Permutationa1, a2, ...,... 阅读全文
摘要:
New Year is coming, and Jaehyun decided to read many books during 2015, unlike this year. He hasnbooks numbered by integers from 1 ton. The weight of ... 阅读全文
摘要:
Kyoya Ootori has a bag withncolored balls that are colored withkdifferent colors. The colors are labeled from1tok. Balls of the same color are indisti... 阅读全文
摘要:
模p乘法逆元:对于整数a,p,若存在整数b,满足ab mod p = 1 ,则说b是a模p的乘法逆元a存在模p乘法逆元的充分必要条件是gcd(a,p)=1证明略。那什么时候我们需要用到逆元呢?比如我们要求a/b%p,我们知道,乘法是可以直接取余,但是除法是不可以直接取余的。这个时候我们要怎么转化呢?... 阅读全文
摘要:
Paladin Manao caught the trail of the ancient Book of Evil in a swampy area. This area containsnsettlements numbered from 1 ton. Moving through the sw... 阅读全文
摘要:
Atreeis a graph withnvertices and exactlyn - 1edges; this graph should meet the following condition: there exists exactly one shortest (by number of e... 阅读全文
摘要:
Appleman has a tree withnvertices. Some of the vertices (at least one) are colored black and other vertices are colored white.Consider a set consistin... 阅读全文