I - Tetrahedron HDU - 6814】的更多相关文章

题目链接:https://vjudge.net/problem/HDU-6814 题意:在[1,n]中随机取三个数a,b,c作为直角四面体的三条直角棱,求顶点d到ABC面的高的倒数平方的数学期望. 思路: 1 //#include<bits/stdc++.h> 2 #include<time.h> 3 #include <set> 4 #include <map> 5 #include <stack> 6 #include <cmath&g…
题意: 给你一个n,你需要从1到n(闭区间)中选出来三个数a,b,c(可以a=b=c),用它们构成一个直角四面体的三条棱(可看图),问你从D点到下面的三角形做一条垂线h,问你1/h2的期望 题解: 那么1/h2=1/a2+1/b2+1/c2 总数就是n3 之后就是找分子怎么求,规律:  ((1/a1*a1)*n*n+(1/a2*a2)*n*n+(1/an*an)*n*n)/(n*n*n) a的取值从1到n 代码: #include<stack> #include<queue> #i…
Special Tetrahedron 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5839 Description Given n points which are in three-dimensional space(without repetition). Please find out how many distinct Special Tetrahedron among them. A tetrahedron is called Sp…
HDU 5839 Special Tetrahedron 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5839 Description Given n points which are in three-dimensional space(without repetition). Please find out how many distinct Special Tetrahedron among them. A tetrahedron is ca…
Special Tetrahedron 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5839 Description Given n points which are in three-dimensional space(without repetition). Please find out how many distinct Special Tetrahedron among them. A tetrahedron is called Sp…
tetrahedron/center> 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5726 Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD. Input Multiple test cases (test cases ≤100). Each test cases contains a lin…
tetrahedron 传送门 Time Limit: 2000/1000 MS (Java/Others)   Memory Limit: 65536/65536 K (Java/Others) Problem DescriptionGiven four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD. InputMultiple test cases .Each test cases…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5839 在一个三维坐标,给你n个点,问你有多少个四面体(4个点,6条边) 且满足至少四边相等 其余两边不相邻. 暴力4重循环,但是在第3重循环的时候需要判断是否是等腰三角形,这便是一个剪枝.在第4重循环的时候判断4点是否共面 (叉乘), 5或者6边相等就+1,4边相等就判断另外两边是否相交就行了. 赛后过的,觉得自己还是太菜了. //#pragma comment(linker, "/STACK:10…
题目链接 tetrahedron 题目大意 输入一个四面体求其内心,若不存在内心则输出"O O O O" 解题思路 其实这道题思路很简单,只要类推一下三角形内心公式就可以了. 至于如何判断无解,计算一下体积若V<=0则无解 Code #include <bits/stdc++.h> using namespace std; const double eps = 1e-8; struct point{ double x, y, z; point (double xx =…
tetrahedron Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 889    Accepted Submission(s): 382 Problem Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed spher…