摘要: 相比较ATan,ATan2究竟有什么不同?本篇介绍一下ATan2的用法及使用条件。对于tan(θ) =y/x:θ=ATan(y/x)求出的θ取值范围是[-PI/2, PI/2]。θ=ATan2(y, x)求出的θ取值范围是[-PI, PI]。当 (x,y) 在第一象限, 0 <θ<PI/2.当(x,... 阅读全文
posted @ 2015-07-31 20:12 柳下_MBX 阅读(2344) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeconst double pi=3.141592653;int main(){ int t; scanf("%d",&t); while(t--){ int n; scanf("%d",&n); double a... 阅读全文
posted @ 2015-07-31 20:08 柳下_MBX 阅读(391) 评论(0) 推荐(0) 编辑
摘要: Encrypting passwords is one of the most important problems nowadays, and you trust only the encryp- tion algorithms which you invented, and you have j 阅读全文
posted @ 2015-07-31 18:50 柳下_MBX 阅读(195) 评论(0) 推荐(1) 编辑
摘要: Problem Description For a tree, which nodes and edges are all weighted, the ratio of it is calculated according to the following equation. Given a com 阅读全文
posted @ 2015-07-31 09:33 柳下_MBX 阅读(155) 评论(0) 推荐(0) 编辑