- 博客(4)
- 收藏
- 关注
转载 如何学好算法
这是关于如何学好算法第一阶段:练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码, 因为太常用,所以要练到写时不用想,10-15分钟内打完,甚至关掉显示器都可以把程序打 出来. 1.最短路(Floyd、Dijstra,BellmanFord) 2.最小生成树(先写个prim,kruscal要用并查集,不好写) 3.大数(高精度)加减乘除 4.二分查找
2015-07-17 17:45:51 666
原创 2015.7.15 codeforces 2组B题
题目源#include #include #include #include #include #include #include #include #include #include #include #define PI acos(-1.0)const int inf = (1<<30) - 10;using namespace std;inline
2015-07-15 09:34:48 295
原创 HDU 2199 二分查找
#include#include#includedouble m;void sou(double n){ double hight=100.0,low=0.0,x; while(hight-low>1e-6) //坑,样例能过WA,样例不过AC,HDU问题题 { m=(hight+low)/2; x=
2015-07-12 18:22:56 358
原创 HDU 2141二分小解
#include#include#include#includeusing namespace std;int e[250000]; //卡一点二分int sou(__int64 hight,__int64 low,int m) //二分查找{ while(low { int mid=(hight+lo
2015-07-12 16:17:32 321
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人