摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=1007求最近两个点的距离《算法导论》p591的分治算法 O(nlogn)再改造下《算法竞赛入门经典》p143 归并排序的代码 1 #include <cstdio> 2 #include <cmath> 3 #include <algorithm> 4 using namespace std; 5 6 const double eps=1e-8; 7 int dcmp(double x) 8 { 9 return x<-eps?-1:x>eps;10 }11 s
阅读全文