题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4720
用几何模板,求外接圆,再判断点在不在圆内
#include
#include
#include
const double esp = 1e-9;
//点
struct Point {
double x, y;
Point() {}
Point(double x...
分类:
其他好文 时间:
2014-05-10 08:52:52
阅读次数:
336
1 jQuery.fn.single_double_click =
function(single_click_callback, double_click_callback, timeout) { 2 return
this.each(function(){ 3 var clicks...
分类:
数据库 时间:
2014-05-08 20:54:46
阅读次数:
373
C标准库了提供了 atoi, atof, atol, atoll(C++11标准)
函数将字符串转换成int,double, long, long long 型。 char str[] = "15.455"; double db; int i;
db = atof(str); /...
分类:
其他好文 时间:
2014-05-08 19:45:22
阅读次数:
246
1、数据类型 Java的数据类型分为基本数据类型和引用数据类型。 a, 基本数据类型包括:byte,
boolean, char, short, int, long, float, double; b, 每个基本数据类型都有相应的引用类型,比如int ->
Integer,char -> ch...
分类:
编程语言 时间:
2014-05-07 17:54:03
阅读次数:
417
第七章编程练习答案
7.1编写一个程序,用户不停输入两数,直到有0出现为止,计算调和平均数
//7.1编写一个程序,用户不停输入两数,直到有0出现为止,计算调和平均数
#include
using namespace std;
double average (unsigned x, unsigned y)
{
return (2.0 * x * y / (x + y));
}
i...
分类:
编程语言 时间:
2014-05-07 12:03:52
阅读次数:
727
修正单纯性法
代码如下:
舍去了输入转化的内容,主要包含算法关键步骤。
public class LPSimplexM {
private static final double inf = 1e9;
private int n; // 约束个数
private double[][] A; // 输入函数参数
private do...
分类:
编程语言 时间:
2014-05-07 11:54:08
阅读次数:
547
题目来源:HDU 1542 Atlantis
题意:给你一些矩形(左下角和右上角)求面积
思路:参考here这个超赞的 一看就懂了
#include
#include
#include
#include
using namespace std;
const int maxn = 210;
struct node
{
double l, r, h;
int s, val;
nod...
分类:
其他好文 时间:
2014-05-07 08:59:09
阅读次数:
395
1、java提供了8中数据结构1、byte -----有符号--------1个字节2、int------有符号----------4个字节3、long------有符号--------8个字节4、char------有符号---------2个字节5、float-----有符号-------4个字节6、double-----有符号-----8个字节7、boolean-----只能取值true、f...
分类:
编程语言 时间:
2014-05-07 05:08:36
阅读次数:
313
Java在java.math包中提供的API类BigDecimal,用来对超过16位有效位的数进行精确的运算。双精度浮点型变量double可以处理16位有效数。在实际应用中,需要对更大或者更小的数进行运算和处理。float和double只能用来做科学计算或者是工程计算,在商业计算中要用java.math.BigDecimal。BigDecimal所创建的是对象,我们不能使用传统的+、-、*、/等算...
分类:
其他好文 时间:
2014-05-06 19:23:46
阅读次数:
288
#include #include //#include #include #include
//using namespace std;int main(){ double a = (-4.0+sqrt(7.0))/3.0; double b =
(-4.0-sqrt(7.0))/3....
分类:
其他好文 时间:
2014-05-06 13:29:21
阅读次数:
325