Sicily1059-Exocenter of a Trian】的更多相关文章

Description Given a triangle ABC, the Extriangles of ABC are constructed as follows: On each side of ABC, construct a square (ABDE, BCHJ and ACFG in the figure below). Connect adjacent square corners to form the three Extriangles (AGD, BEJ and CFH in…
代码地址: https://github.com/laiy/Datastructure-Algorithm/blob/master/sicily/1059.c 1059. Exocenter of a Trian Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Given a triangle ABC, the Extriangles of ABC are constructed as follows: On eac…
地址:http://poj.org/problem?id=1673 题目: EXOCENTER OF A TRIANGLE Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3637   Accepted: 1467 Description Given a triangle ABC, the Extriangles of ABC are constructed as follows: On each side of ABC,…
题目链接 折腾了半天,没想出怎么证明,以前初中老师教过,不知道怎么办,就量量...受不了,怒抄模版1Y... #include <cstdio> #include <iostream> using namespace std; #define eps 1e-8 struct point { double x,y; }; struct line { point a,b; }; point intersection(line u,line v) { point ret = u.a; d…
题目链接:http://poj.org/problem?id=1673 AC代码: #include<cstdio> #include<cmath> #include<algorithm> #include<iostream> #include<cstring> using namespace std; typedef long long ll; ; const double pi = acos(-1.0); int sgn(double x)…
转载 - Recurrent Neural Networks Tutorial, Part 2 – Implementing a RNN with Python, Numpy and Theano 本文是RNN教程的第二部分,第一部分教程在这里. 对应的样板代码在 Github上面. 在这部分内容中,我将会使用 numpy 和 theano 从头开始实现RNN 模型. 实验中涉及的代码可以在Github中找到.一些不重要的内容将会略去,但是Github中保留了全部的实践过程. 语言建模 Our…
k-折交叉验证(k-fold crossValidation): 在机器学习中,将数据集A分为训练集(training set)B和测试集(test set)C,在样本量不充足的情况下,为了充分利用数据集对算法效果进行测试,将数据集A随机分为k个包,每次将其中一个包作为测试集,剩下k-1个包作为训练集进行训练. 在matlab中,可以利用: indices=crossvalind('Kfold',x,k); 来实现随机分包的操作,其中x为一个N维列向量(N为数据集A的元素个数,与x具体内容无关,…
转自:http://blog.csdn.net/tyger/article/details/4480029 计算几何题的特点与做题要领:1.大部分不会很难,少部分题目思路很巧妙2.做计算几何题目,模板很重要,模板必须高度可靠.3.要注意代码的组织,因为计算几何的题目很容易上两百行代码,里面大部分是模板.如果代码一片混乱,那么会严重影响做题正确率.4.注意精度控制.5.能用整数的地方尽量用整数,要想到扩大数据的方法(扩大一倍,或扩大sqrt2).因为整数不用考虑浮点误差,而且运算比浮点快. 一.点…
[原文:http://wenku.baidu.com/view/7e7b6b896529647d27285276.html] 目  录 1 Libsvm下载... 3 2 Libsvm3.0环境变量设置... 3 3 训练和测试数据集下载... 3 4 运行python程序的环境配置... 3 5 LIBSVM 使用的一般步骤是:... 3 6 再来说一下,libsvm-3.0的需要的数据及其格式.... 4 7 Libsvm数据格式制作:... 4 8 Windows版本的工具... 4 9 …
所谓Exocenter就是垂心.不难证明. #include <iostream> #include <math.h> #include <stdio.h> struct point{ double x, y; }; struct line{ point a, b; }; double distance(point p1, point p2){ return sqrt((p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y -…