题目链接:Around the World 题意: 给你n个点,有n-1条边,现在这n-1条边又多增加了ci*2-1条边,问你有多少条欧拉回路 题解: 套用best定理 Best Theorem:有向图中以 i 为起点的欧拉回路个数为以 i 为根的树形图个数 ×(( 每个点 度数 ?1)!)。 Ma ...
分类:
其他好文 时间:
2016-10-02 21:36:06
阅读次数:
180
Forms in Angular 2 are essentially wrappers around inputs that group the input values together into an object and also check that all the inputs are v ...
分类:
其他好文 时间:
2016-09-27 19:34:24
阅读次数:
129
问题描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is ...
分类:
其他好文 时间:
2016-09-24 20:19:34
阅读次数:
129
May the joy and happiness around you today and tomorrow. ...
分类:
其他好文 时间:
2016-09-23 14:54:03
阅读次数:
107
Today I typed the following: Why did I put parentheses around std::max? Because windows.h defines (among other things) a max and a min macro. If you i ...
分类:
其他好文 时间:
2016-09-22 10:03:27
阅读次数:
186
题意:John有n个牛棚,每个牛棚都住着一些牛,这些牛喜欢串门(drop around, 学到了。。。),所以John想要建几条路把他们连接起来。他选择的方法是建两个相连中转站,然后每个牛棚连接其中一个中转站就好啦。现在的问题是有一些牛相互憎恨,所以不能连同一个中转站,而又有一些牛相互喜欢,必须连同 ...
分类:
其他好文 时间:
2016-09-21 12:59:55
阅读次数:
136
bzoj1621[Usaco2008 Open]Roads Around The Farm分岔路口 题意: n头牛在路上走,每当它们走到岔路,如果这些牛可以分为数量相差刚好为k的两群,那么它们就会分成这样的两群往前走,否则就会停下来吃草。问最后有多少群在吃草。n≤10^9,k≤1000。 题解: 暴 ...
分类:
其他好文 时间:
2016-09-18 21:01:08
阅读次数:
152
Problem Description A mysterious country will hold a football world championships Abnormal Cup, attracting football teams and fans from all around the ...
分类:
其他好文 时间:
2016-09-18 19:21:14
阅读次数:
116
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet ...
分类:
其他好文 时间:
2016-09-16 21:15:36
阅读次数:
109
SPF BackgroundConsider the two networks shown below. Assuming that data moves around these networks only between directly connected nodes on a peer-to ...
分类:
其他好文 时间:
2016-09-16 18:23:44
阅读次数:
230