题目传送门

 /*
这道题花了好长时间AC,思路有,但是表达式少写了括号一直乱码,囧!
注意:a==0时要特判:)
*/
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <cmath>
using namespace std; const int MAXN = 1e4 + ;
const int INF = 0x3f3f3f3f;
const double PI = acos (-1.0); double f(double k)
{
return 1.0 * k * PI / ;
} int main(void) //ACdream 1196 KIDx's Triangle
{
//freopen ("H.in", "r", stdin); double a, b, c, d;
double ae, cd, ce, de, ab, ad, be, bd;
double x;
while (scanf ("%lf%lf%lf%lf", &a, &b, &c, &d) == )
{
if (a == )
{
puts ("0.00"); continue;
} ad = sin (f(c)) / sin (f(a+b+c));
ae = sin (f(c+d)) / sin (f(b+c+d));
be = sin (f(b)) / sin (f(b+c+d));
bd = sin (f(a+b)) / sin (f(a+b+c));
de = sqrt (be*be + bd*bd - * be * bd * cos (f(d))); x = acos ((de*de+ae*ae-ad*ad) / (2.0 * de * ae)) * / PI; if (x < ) printf ("%.2f\n", 180.0 - x);
else printf ("%.2f\n", x);
} return ;
}

数学 ACdream 1196 KIDx's Triangle的更多相关文章

  1. 模拟 ACdream 1196 KIDx's Pagination

    题目传送门 /* 简单模拟:考虑边界的情况输出的是不一样的,还有思维好,代码能短很多 */ #include <cstdio> #include <iostream> #inc ...

  2. acdream.18.KIDx's Triangle(数学推导)

    KIDx's Triangle Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Sub ...

  3. acdream.A Very Easy Triangle Counting Game(数学推导)

    A - A Very Easy Triangle Counting Game Time Limit:1000MS     Memory Limit:64000KB     64bit IO Forma ...

  4. 周赛-KIDx's Pagination 分类: 比赛 2015-08-02 08:23 7人阅读 评论(0) 收藏

    KIDx's Pagination Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) S ...

  5. ACdream区域赛指导赛之专题赛系列(1)の数学专场

    Contest : ACdream区域赛指导赛之专题赛系列(1)の数学专场 A:EOF女神的相反数 题意:n(<=10^18)的数转化成2进制.翻转后(去掉前导零)输出十进制 思路:water ...

  6. HDU 5914 Triangle 数学找规律

    Triangle 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5914 Description Mr. Frog has n sticks, who ...

  7. acdream.LCM Challenge(数学推导)

     LCM Challenge Time Limit:1000MS     Memory Limit:64000KB     64bit IO Format:%lld & %llu Submit ...

  8. acdream.Triangles(数学推导)

    Triangles Time Limit:1000MS     Memory Limit:64000KB     64bit IO Format:%lld & %llu Submit Stat ...

  9. acdream.Bet(数学推导)

    Bet Time Limit:1000MS     Memory Limit:64000KB     64bit IO Format:%lld & %llu Submit Status Pra ...

随机推荐

  1. Card(bestcoder #26 B)

    Card Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  2. Phpstorm常用设置

    Phpstorm更换主题和字体 1.File -- settings -- Editor -- Colors And Fonts: 2.在右侧窗口中选择Scheme name : 选择一个自己喜欢的主 ...

  3. HDU3345广搜 (P,E,T,#)

    War chess is hh's favorite game:In this game, there is an N * M battle map, and every player has his ...

  4. django-cms 代码研究(八)app hooks

    app钩子,啥玩意呢? 就是把现有的app,集成到cms的一种手段. 有两种实现方式: 1) 定义cms_app.py,如下: from cms.app_base import CMSApp from ...

  5. 在Sharepoint 2010中启用Session功能的说明文档

    在Sharepoint 2010中启用Session功能的说明文档 开发环境:Windows 7系统,SharePoint Server 2010,Visual Studio 2010 按以下步骤进行 ...

  6. mysql 恢复备份

    1.在my.cnf 文件中增加以下配置 log-bin=/var/lib/mysql/mysql-binloglog-bin-index = /var/lib/mysql/mysql-binlog 2 ...

  7. Java for LeetCode 047 Permutations II

    Given a collection of numbers that might contain duplicates, return all possible unique permutations ...

  8. 【USACO】namenum

    //开始傻×了 受题目形容的误导 一心想生成所有可能的 字符串组合 之后查找非常慢 //听了同学的 将5000个dict里的字符串 转换成char型数组(不能直接用int 会越界)直接用输入的数据对着 ...

  9. SharedPreferences&SQLite比较

    SharedPreferences是Android平台上一个轻量级的存储类,主要是保存一些常用的配置比如窗口状态,一般在Activity中 重载窗口状态onSaveInstanceState保存一般使 ...

  10. 谈谈Objective-C的警告 (转)

    原文地址:http://onevcat.com/2013/05/talk-about-warning/ 一个有节操的程序员会在乎自己的代码的警告,就像在乎饭碗边上有只死蟑螂那样. ——@onevcat ...