- 博客(4)
- 收藏
- 关注
原创 基本最小生成树—Kruskal
/* 对权值进行排序,然后从小到大进行判断, 如果加入这条边,不成环则是所求树的边。 (并查集) */ #include <iostream> #include <algorithm> #include <cstdio> using namespace std; int par[1020]; int ran[1020]; struct edge{ int u,v,dis; }e[1020
2017-12-22 00:17:42
181
原创 并查集-畅通工程 HDU 1232
http://acm.hdu.edu.cn/showproblem.php?pid=1232 并查集模板题 畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 59596 Accepted Submission(s): 31
2017-12-19 22:46:18
242
转载 hdoj 2199二分查找
给出方程: 8*x4 + 7*x3 + 2*x2 + 3*x + 6 = Y 其中,实数Y满足 (fabs(Y) <= 1e10)请输出x在区间[0,100]的解,结果精确到小数点后4位。看着 课件写的 ,慢慢理解 中#include <iostream> #include <cstdio> #include <cmath> using namespace std; doub
2017-03-15 21:41:03
658
原创 快速幂求余hpu
http://acm.hpu.edu.cn/problem.php?cid=1015&pid=32 题目描述 这天小明又不开心了, 小明数学考零分, 麻麻竟然打小明屁股, 小明为了证明自己, 决定解决一道题目来证明自己, 题目意思如下:给出一个整数N,输出N^N(N的N次方)的十进制表示的末位数字。输入 第一行输入一个整数t,代表有t组测试数据(t <= 50)每组数据只有一个整数N(1 <=
2017-03-15 19:09:49
321
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅