bnu 10805 矩形神码的 平面向量的运行
矩形神码的
None
Graph Theory
2-SAT
Articulation/Bridge/Biconnected Component
Cycles/Topological Sorting/Strongly Connected Component
Shortest Path
Bellman Ford
Dijkstra/Floyd Warshall
Euler Trail/Circuit
Heavy-Light Decomposition
Minimum Spanning Tree
Stable Marriage Problem
Trees
Directed Minimum Spanning Tree
Flow/Matching
Graph Matching
Bipartite Matching
Hopcroft–Karp Bipartite Matching
Weighted Bipartite Matching/Hungarian Algorithm
Flow
Max Flow/Min Cut
Min Cost Max Flow
DFS-like
Backtracking with Pruning/Branch and Bound
Basic Recursion
IDA* Search
Parsing/Grammar
Breadth First Search/Depth First Search
Advanced Search Techniques
Binary Search/Bisection
Ternary Search
Geometry
Basic Geometry
Computational Geometry
Convex Hull
Pick's Theorem
Game Theory
Green Hackenbush/Colon Principle/Fusion Principle
Nim
Sprague-Grundy Number
Matrix
Gaussian Elimination
Matrix Exponentiation
Data Structures
Basic Data Structures
Binary Indexed Tree
Binary Search Tree
Hashing
Orthogonal Range Search
Range Minimum Query/Lowest Common Ancestor
Segment Tree/Interval Tree
Trie Tree
Sorting
Disjoint Set
String
Aho Corasick
Knuth-Morris-Pratt
Suffix Array/Suffix Tree
Math
Basic Math
Big Integer Arithmetic
Number Theory
Chinese Remainder Theorem
Extended Euclid
Inclusion/Exclusion
Modular Arithmetic
Combinatorics
Group Theory/Burnside's lemma
Counting
Probability/Expected Value
Others
Tricky
Hardest
Unusual
Brute Force
Implementation
Constructive Algorithms
Two Pointer
Bitmask
Beginner
Discrete Logarithm/Shank's Baby-step Giant-step Algorithm
Greedy
Divide and Conquer
Dynamic Programming
Tag it!
Input
Output
Sample Input
2
1.0 1.0 -1.0 -1.0 90.0
3.0 2.0 2.5 9.99 36.00
Sample Output
4.000000
18.835608
Hint
Source
Author
Tags ( Click to see)
初中知识,囧...我的数学
/*
刚开始,我居然不知道,矩阵对角线是一样长的,囧.画了一个圆,才知道。
刚开始,我居然不知道,c语言里cos()是用弧度的。囧。
暴力了数学的差。 向量的 AB=B-A;
第一种方法:向量法。
求出中点坐标,然后根据向量求出另一个点。
第二种方法:s=1/2*a*b*sinc; */ //第一种
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<math.h>
using namespace std; double pi=acos(-1.0); int main()
{
int t;
double x1,y1,x2,y2,theta;
double avex,avey,hxl,tom,x3,y3,x4,y4;
while(scanf("%d",&t)>)
{
while(t--)
{
scanf("%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&theta);
theta=theta/*pi;
avex=(x1+x2)/;
avey=(y1+y2)/;
x4=x2-avex;//向量坐标
y4=y2-avey; x3=x4*cos(theta)-y4*sin(theta);
y3=x4*sin(theta)+y4*cos(theta);
x3=x3+avex;
y3=y3+avey; hxl=sqrt( (x3-x1)*(x3-x1)+(y3-y1)*(y3-y1) );
tom=sqrt( (y3-y2)*(y3-y2)+(x3-x2)*(x3-x2) ); printf("%.6lf\n",hxl*tom);
}
}
return ;
}
bnu 10805 矩形神码的 平面向量的运行的更多相关文章
- BNU10805:矩形神码的
我们都知道,矩形是由两条对角线的,没错吧?(谜之声:这不是显然么!)这两条线的长度也是相等的,没错吧?(谜之声:这不废话么!)然后我们给定一条对角线的起始点和终止点的坐标,然后给定另一个对角线和他的夹 ...
- 源码深度解析SpringMvc请求运行机制(转)
源码深度解析SpringMvc请求运行机制 本文依赖的是springmvc4.0.5.RELEASE,通过源码深度解析了解springMvc的请求运行机制.通过源码我们可以知道从客户端发送一个URL请 ...
- 转:[gevent源码分析] 深度分析gevent运行流程
[gevent源码分析] 深度分析gevent运行流程 http://blog.csdn.net/yueguanghaidao/article/details/24281751 一直对gevent运行 ...
- 老李推荐:第8章7节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-小结
老李推荐:第8章7节<MonkeyRunner源码剖析>MonkeyRunner启动运行过程-小结 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化测试,性 ...
- 老李推荐:第8章5节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-运行测试脚本
老李推荐:第8章5节<MonkeyRunner源码剖析>MonkeyRunner启动运行过程-运行测试脚本 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化 ...
- 老李推荐:第8章1节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-运行环境初始化
老李推荐:第8章1节<MonkeyRunner源码剖析>MonkeyRunner启动运行过程-运行环境初始化 首先大家应该清楚的一点是,MonkeyRunner的运行是牵涉到主机端和目 ...
- Ubuntu TensorFlow 源码 Android Demo的编译运行
Ubuntu TensorFlow 源码 Android Demo的编译运行 一. 安装 Android 的SDK和NDK SDK 配置 A:下载 国内下载地址选最新的: SDK: https://d ...
- Spark源码分析之八:Task运行(二)
在<Spark源码分析之七:Task运行(一)>一文中,我们详细叙述了Task运行的整体流程,最终Task被传输到Executor上,启动一个对应的TaskRunner线程,并且在线程池中 ...
- {bzoj2338 [HNOI2011]数矩形 && NBUT 1453 LeBlanc}平面内找最大矩形
思路: 枚举3个点,计算第4个点并判断是否存在,复杂度为O(N3logN)或O(N3α) 考虑矩形的对角线,两条对角线可以构成一个矩形,它们的长度和中点必须完全一样,于是将所有线段按长度和中点排序,那 ...
随机推荐
- 洛谷P3964 [TJOI2013]松鼠聚会(坐标系变换)
题面 传送门 题解 对于两个点\((x_i,y_i)\)和\(x_j,y_j\),我们定义它们之间的曼哈顿距离为 \[|x_i-x_j|+|y_i-y_j|\] 定义它们的切比雪夫距离为 \[\max ...
- (三)SSO之CAS框架单点退出,退出到CAS登录界面
应需求的改变.CAS自定义登录页面不安全,不再使用,于是我一下子回到了原点,在linux上部署上了没有加自定义登陆界面的CAS,接下来开始修改CAS自己默认的登录界面为我们的界面. 一下子修改成功是根 ...
- [AS3.0] 解决Number类型计算不精确问题
看下面代码运行结果: trace(256.08+123.1); //379.17999999999995 trace(256.08-123.11); //132.96999999999997 trac ...
- UVA10140 Prime Distance
UVA10140 Prime Distance 给定两个整数L,R(1<=L<=R<=2^{31},R-L<=10^6)L,R(1<=L<=R<=231,R− ...
- C#-WebForm-AJAX阿贾克斯(二)★★★★★ajax的完整结构★★★★★
ajax完整结构: $.ajax({ url:"",//服务器路径 data:{},//给服务端传递的参数,可以没有,也可以是多个 type:"post", / ...
- Sci-Hub
提到Sci-Hub这个文献下载利器,大家肯定都不陌生.你在各大SCI杂志上看到的英文文献,90%以上都能免费下载.因为它严重侵犯了爱思唯尔.施普林格.Wiley等各大出版商的利益,遭到起诉与封杀. 不 ...
- FJWC2019 全连
题目描述 有n个音符,第i个音符会在第i个时刻来临 令第 i 个音符的准备时间为 ti 个单位时间,如果选择去点击第 i 个音符,那么就没法点击所有到来时刻在 (i−ti ,i+ti)中的音符. ...
- Centos7安装python3.7.1并与python2共存
转自:http://www.cnblogs.com/JahanGu/p/7452527.html参考:https://www.jb51.net/article/104326.htm 1. 备份原来的p ...
- mysql grant权限总结
2019-01-07 转自 https://blog.csdn.net/wulantian/article/details/38230635 一.权限表 mysql数据库中的3个权限表:user .d ...
- mvvm小论(暂记)
广州-PC26(34627) 2:09:44 在android 线程最后用 handler = new Handler(); updateThread = new Runnabl ...