- 博客(3)
- 收藏
- 关注
原创 并查基类型总结
暑期ACM第二练--并查集 第一类:普通并查集: 感觉学会模板,套模板,必过,超时的话就加点优化,数据过大就加优化,init()以及最大值处是优化的地方,以及数组的个数(自身经历,开过大的数组会耗时); 第二类:带权并查集: http://www.cppblog.com/yuan1028/archive/2011/02/13/139990.html 看了下这个博客
2016-07-22 17:52:34 346
原创 hdu 1988-More is better-带权并查集
A - More is better Time Limit:1000MS Memory Limit:102400KB 64bit IO Format:%I64d & %I64u Submit Status Description Mr Wang wants some boys to help him with a project. Because the
2016-07-21 17:38:00 381
原创 荷兰国旗
题目: 一串数组,0 1 2构成 使其成为0 0 .. 0 1 1 ..1 2 .. 2的形式 #include #include using namespace std; int a[100]; void Holland(int len) { int i; for(i=1;i cin>>a[i]; int begin=1,curr
2016-07-15 16:34:48 233
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人