滴答滴答---题目链接

Let d be the diameter of a circle with center c = (ab). A square has been drawn inside that circle such that its vertices lies at the circle's circumference. Four circles have been drawn on the square's sides such that the diameter of each circle is the side of the square, as shown in the figure below.

Your task is to calculate the shaded area in the figure for a given d. Can you?

Input

The first line contains an integer T (1 ≤ T ≤ 105), in which T is the number of test cases.

Each test case consists of a line containing an three integers ab, and d ( - 109 ≤ a, b ≤ 109) (1 ≤ d ≤ 109), giving the center and the diameter of a circle.

Output

For each test case, print a single line containing shaded area.

Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.

Example

Input

1
2 3 8

Output

32
#include <bits/stdc++.h>
int main()
{int t;scanf("%d",&t);while(t--){int  a,b,d;scanf("%d%d%d",&a,&b,&d);double r=d/2.0;double ans=3.14*r*r;double p=d/sqrt(2.0);double r1=p/2.0;double sum=2*3.14*r1*r1;ans=sum-ans+p*p;printf("%lf\n",ans);}return 0;
}

I - Circles (SDUT 2018 Autumn Individual Contest - I)相关推荐

  1. M - Maratona Brasileira de Popcorn(SDUT 2019 Autumn Team Contest 6th)

    M - Maratona Brasileira de Popcorn 解题思路: 核心思想:二分法+枚举 最少的天数为一天,最多的天数为所有数的总和.采用二分,如果中间这个天数下所需人数超出限制,则证 ...

  2. SDUT 2021 Spring Individual Contest(for 20) - 9(2)(部分)补题

    A - hzy 和zsl 的生存挑战 zsl 和hzy 来到了臭臭城堡,打算挑战臭臭城堡的大魔王hyz,大魔王hyz设置了这样的一个挑战: zsl 和hzy两个人各自来到一间密室,期间两人无法以任何形 ...

  3. SDUT 2021 Spring Individual Contest(for 20) - 1

    文章目录 A - Sherlock Bones B - Unusual Team C - Cheap Kangaroo D - Magical Bamboos E - Competitive Seag ...

  4. SDUT 2022 Summer Individual Contest - 12(for 21)

    ------水赛总结 A - Window Gym - 101020A Jerry Smith is Rick's Son-in-Law and Morty's father. He recently ...

  5. SDUT 2021 Spring Individual Contest(for 20) - 2

    文章目录 Taymyr is calling you City WERTYU Heist E Find The Multiple Prime Path Sum of Consecutive Prime ...

  6. GuGuFishtion(2018 Multi-University Training Contest 7)

    GuGuFishtion 推式子 ∑a=1m∑b=1nϕ(a,b)ϕ(a)ϕ(b)=∑a=1m∑b=1ngcd(a,b)ϕ(gcd(a,b))=∑d=1mdϕ(d)∑a=1md∑b=1mdgcd(a, ...

  7. SDUT 2021 Winter Individual Contest - J(Gym-101879)

    Gym-101879 B - Aesthetics in poetry D - Maximizing Advertising E - Group work G - Running a penitent ...

  8. SDUT 2022 Winter Individual Contest - D(K)

    链接: link. K - Dishonest Driver 题意: 给定一个长度为 N N N的字符串,现在需要将字符串进行压缩,压缩的规则就是相同的子串的可以缩写,例如 a a a b a a a ...

  9. SDUT 2021 Winter Individual Contest - G

    Kattis A - Basketball One-on-One C - Convoy F - Dragon Ball I H - Farming Mars I - Soft Passwords L ...

  10. Netflix 增长的逻辑——第二曲线(混沌2018年度大课笔记1)

    什么是增长的逻辑? 增长的逻辑:用不变的第一性原理,在第一曲线中找到破局点/失速点,跨越非连续性,将单一要素最大化,扩大到第二曲线中的全部,实现增长 记住加黑的关键词,及其所处的位置,后面一一介绍其含 ...

最新文章

  1. XML Schema用法
  2. python类装饰器详解-Python装饰器详解
  3. Linux 下的NFS server 架设基础及方法
  4. nginx 学习笔记(5) nginx调试日志
  5. 1082 Read Number in Chinese (25 分)【难 / 模拟 字符串】
  6. linux磁盘结构需要清理,无法删除文件:“结构需要清洁”
  7. java k均值_算法——K均值聚類算法(Java實現)
  8. php 访问 sharepoint列表,SharePoint—用REST方式访问列表
  9. c++万能头文件_初学Python,与C对比
  10. 如何设置背景图(前端开发)
  11. 《深入理解Java虚拟机》读书笔记一
  12. python 局域网扫描_Python 简化版扫描局域网存活主机
  13. UVA10125 POJ2549 Sumsets【暴力+二分】
  14. Spring Boot与Docker(一):微服务架构和容器化概述
  15. pycharm 的live_template的使用
  16. android模拟器命令行,夜神安卓模拟器命令行整理贴
  17. Python数据分析学习系列 十四 数据分析案例
  18. Win7系统的电脑怎么录屏
  19. tkinter让用户选择文件并返回可读取文件绝对地址
  20. DNS区域(ZONE)相关概念

热门文章

  1. 反射+自定义属性拼接sql
  2. 情侣网名java语言_甜蜜情侣网名600个
  3. python format 用法详解
  4. win7未能成功安装驱动服务器,win7找不到驱动程序提示“未能成功安装设备驱动程序”的解决方法...
  5. Web排行榜相关排序算法总结
  6. 云pos系统的服务器性能,实施云POS系统的五大优势
  7. 修复鹏城开发者云硬盘扩容报错 fdisk: cannot write disk label: Invalid argument
  8. 【2019暑假】市中小学生游泳比赛-酱油记By Chavapa
  9. 互联网行业的众生相,不向命运低头的“英雄主义”
  10. Elasticsearch学习4《Elasticsearch的各种查询》