题目链接:

https://vjudge.net/contest/251958#problem/G

具体思路:

圆内四边形内角互补,所以,如图所示。

证明,三角形oda和三角形obc相似。

第一步,角o都相等

第二步,证明角oda等于角obc。(角oda+角adc=180.角adc+角abc等于180(圆的性质,对顶角相加等于180,),所以,得证),

代码链接:

#include<iostream>
#include<string>
#include<cstring>
#include<iomanip>
#include<queue>
#include<stack>
#include<map>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<cmath>
using namespace std;
# define maxn 700000+10
# define ll long long
# define inf 0x3f3f3f3f
char s[maxn];
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
double a,b,c,d;
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
double temp=sqrt(c)/sqrt(d);
double x=(b-a*temp)/temp;
double y=(a-b*temp)/temp;
printf("%lf %lf\n",y,x);
}
return 0;
}

G - Preparing for Exams的更多相关文章

  1. Codeforces Round #481 (Div. 3) G. Petya's Exams

    http://codeforces.com/contest/978/problem/G 感冒是真的受不了...敲代码都没力气... 题目大意: 期末复习周,一共持续n天,有m场考试 每场考试有如下信息 ...

  2. Codeforces Round #481 (Div. 3) G. Petya's Exams (贪心,模拟)

    题意:你有\(n\)天的时间,这段时间中你有\(m\)长考试,\(s\)表示宣布考试的日期,\(d\)表示考试的时间,\(c\)表示需要准备时间,如果你不能准备好所有考试,输出\(-1\),否则输出你 ...

  3. Codeforces Round #377 (Div. 2) D. Exams(二分答案)

    D. Exams Problem Description: Vasiliy has an exam period which will continue for n days. He has to p ...

  4. CF732D. Exams[二分答案 贪心]

    D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...

  5. Codeforces Round #377 (Div. 2) D. Exams 二分

    D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...

  6. Exams

    Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output s ...

  7. CodeForces 732D Exams

    D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...

  8. 【37.50%】【codeforces 732D】Exams

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  9. CF732D Exams 题解

    CF732D Exams 题目描述 Vasiliy has an exam period which will continue for \(n\) days. He has to pass exam ...

随机推荐

  1. mysql and不能同时运用在一个字段上

  2. jenkins和sonar的几个问题

    错误1:有个pom文件内容错了,但是在jenkins上面编译的时候,控制台将这个错误信息给打出来了,maven的编译也打印了failed with error,但是jenkins的job并没有因此而停 ...

  3. Hibernate事务以及一级缓存02

    一. Hibernate中的事务 1. 事务的回顾 1.1 什么是事务(Transaction)(面试重点) 是并发控制的单元,是用户定义的一个操作序列.这些操作要么都做,要么都不做,是一个不可分割的 ...

  4. hdu 4897 Little Devil I (树链剖分+线段树)

    题目链接:  http://acm.hdu.edu.cn/showproblem.php?pid=4897 题意: 给你一棵树,一开始每条边都是白色,有三种操作: 1.将 u - v路径上的边转换颜色 ...

  5. 向git添加和提交文件

    状态 git status 可以知道有哪些文件被修改,哪些文件待提交 当前无待提交文件 分区 三个分区:工作区,缓存区,版本库 三个分区之间的联系: 工作区 >> git add > ...

  6. MT【49】四次函数求最值

    已知$f(x)=(1-x^2)(x^2+ax+b)$的图像关于x=3对称,求$f(x)$的最大值. 解答:显然$-1,7;1,5$是$f(x)=0$的根.故$(x^2+ax+b)=(x-5)(x-7) ...

  7. Linux 上传下载文件 [转]

    从服务器下载文件scp username@servername:/path/filename /tmp/local_destination例如:scp codinglog@192.168.0.101: ...

  8. 【题解】 bzoj2006: [NOI2010]超级钢琴 (ST表+贪心)

    题面戳我 Solution 不会,看的题解 Attention 哇痛苦,一直不会打\(ST\)表,我是真的菜啊qwq 预处理 Log[1]=0;two[0]=1; for(int i=2;i<= ...

  9. BZOJ 5249: [2018多省省队联测]IIIDX(贪心 + 线段树)

    题意 这一天,\(\mathrm{Konano}\) 接到了一个任务,他需要给正在制作中的游戏 \(\mathrm{<IIIDX>}\) 安排曲目 的解锁顺序.游戏内共有\(n\) 首曲目 ...

  10. 自学Linux Shell16.1-函数概念

    点击返回 自学Linux命令行与Shell脚本之路 16.1-函数概念 编写比较复杂的shell脚本时,完成具体任务的代码可能需要重复使用.bash shell提供满足这种要求的特性.函数是被赋予名称 ...