POJ 2031 Building a Space Station 猜一个结论两个球体间的最短距离是圆心间距离减去两个球的半径,如果是负数就说明相交。 然后理解了三维上两个点之间的距离怎么求 //#include<bits/stdc++.h> #include<stdio.h> #include<i ...
分类:
其他好文 时间:
2019-01-12 12:08:24
阅读次数:
160
MATLAB求马氏距离(Mahalanobis distance) 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 1.马氏距离计算公式 d2(xi, xj)=(xi-xj)TS-1(xi-xj) 其中,S是总体的协方差矩阵,而不是样本的协方差矩阵。 ...
分类:
其他好文 时间:
2019-01-10 21:53:32
阅读次数:
825
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa ...
分类:
其他好文 时间:
2019-01-10 17:45:12
阅读次数:
115
Problem: Given a non-empty string s and an integer k, rearrange the string such that the same characters are at least distance k from each other. All ...
分类:
其他好文 时间:
2019-01-10 15:43:00
阅读次数:
214
1.k-近邻算法实现 2.测试 3.实验结果 CABD 实验环境:Ubuntu18.04+Pycharm+python3.6+numpy ...
分类:
编程语言 时间:
2019-01-09 21:37:21
阅读次数:
202
库名称简介 Chardet字符编码探测器,可以自动检测文本、网页、xml的编码。 colorama主要用来给文本添加各种颜色,并且非常简单易用。 Prettytable主要用于在终端或浏览器端构建格式化的输出。 difflib,[Python]标准库,计算文本差异 Levenshtein,快速计算字 ...
分类:
编程语言 时间:
2019-01-07 17:36:45
阅读次数:
345
A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi ...
分类:
其他好文 时间:
2019-01-05 19:59:48
阅读次数:
247
Data Structure and Algorithm Analysis in C++ 5.4.3 Double Hashing In the beginning of chapter 5.4, the formula hi(x) = (hash(x) + f(i)) is mentioned a ...
分类:
其他好文 时间:
2019-01-05 17:18:06
阅读次数:
177
算法需求: 传入【0~1】的时间time,返回【0~1】的路程。 整个路程distance【0~1】分为三段路径: 第一段:在0.25time的时间里,速度从0,位置从distance:0加速移动到距离distance:K 第二段:在0.25time时间里,位置从distance:k减速移动到某距离 ...
分类:
编程语言 时间:
2019-01-02 17:33:02
阅读次数:
242
Train model: Show parameters of best model: Show the score of train set: Fit on test set: Show the score of test set: More about GridSearchCV: https:/ ...
分类:
编程语言 时间:
2019-01-02 10:35:02
阅读次数:
192