题意:n个点m次询问,两种操作:1.将含有龙珠i的集合加入含有龙珠j的集合中;2.查询龙珠i所在堆的编号,龙珠个数,龙珠i的搬运次数;思路:并查集,数组分别维护关系、数量、搬运次数;#include#include#includeusing namespace std;int n,m;int fa[...
分类:
其他好文 时间:
2015-04-12 06:37:33
阅读次数:
119
转载自:http://www.cnblogs.com/fly_dragon/archive/2010/09/03/1817252.html 1 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs ...
分类:
Web程序 时间:
2015-04-08 22:57:52
阅读次数:
193
题目1 : Magic Box时间限制:10000ms单点时限:1000ms内存限制:256MB描述The circus clown Sunny has a magic box. When the circus is performing, Sunny puts some balls into th...
分类:
其他好文 时间:
2015-04-04 18:11:10
阅读次数:
138
DZY Loves Balls
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 394 Accepted Submission(s): 221
Problem Description
There are n ...
分类:
其他好文 时间:
2015-03-30 23:10:34
阅读次数:
378
DZY Loves Balls
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 374 Accepted Submission(s): 205
Problem Description
There are n ...
分类:
其他好文 时间:
2015-03-30 18:48:53
阅读次数:
230
1459. The Dragon of Loowater
Constraints
Time Limit: 1 secs, Memory Limit: 32 MB
Description
Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.
...
分类:
其他好文 时间:
2015-03-30 09:21:28
阅读次数:
137
DZY Loves Balls
Accepts: 371
Submissions: 988
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65536/65536 K (Java/Others)
问题描述
一个盒子里有n
个黑球和m
个白球。现在DZY每次随机从盒子里取走一个球,取了n+m...
分类:
其他好文 时间:
2015-03-29 13:42:43
阅读次数:
185
Cow BowlingTime Limit:1000MSMemory Limit:65536KTotal Submissions:14748Accepted:9804DescriptionThe cows don't use actual bowling balls when they go bow...
分类:
其他好文 时间:
2015-03-29 01:52:05
阅读次数:
163
poj3176——dpCow BowlingTime Limit:1000MSMemory Limit:65536KTotal Submissions:14683Accepted:9764DescriptionThe cows don't use actual bowling balls when ...
分类:
其他好文 时间:
2015-03-20 20:08:36
阅读次数:
128
Swift语言有很多特性,其中之一就是类型方法,相对于其他比较流行的编程语言(C#、Java),在Swift中类型方法最大的特征在于它的可继承性,我们举个例子说明:俗话说,龙生龙凤生凤老鼠生儿会打洞;虽说龙和鼠都属于动物,但毕竟不是同类,所以生出来的当然不一样。同理,对于Dragon和Mouse两个...
分类:
编程语言 时间:
2015-03-20 01:14:13
阅读次数:
161