题目链接:

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. ajax跨域,携带cookie

    解决方案很简单. 直接上代码: web.xml中: 添加了 cors来解决跨域 (奇怪的是,credentials设置为false.反正这个是照搬的...)   <filter>     ...

  2. codeforces 777C

    C.Alyona and Spreadsheet During the lesson small girl Alyona works with one famous spreadsheet compu ...

  3. MT【220】三次方程必有实根

    设$f(x)=x^2+ax+b,g(x)=x^2+cx+d$,如果$f(g(x))=g(f(x))$没有实根,求证:$b\ne d$ 分析:$f(g(x))-g(f(x))=2(c-a)x^3+\cd ...

  4. BZOJ 3612: [Heoi2014]平衡

    3612: [Heoi2014]平衡 Time Limit: 10 Sec  Memory Limit: 256 MBSubmit: 283  Solved: 219[Submit][Status][ ...

  5. 洛谷 P1069 细胞分裂 解题报告

    P1069 细胞分裂 题目描述 \(Hanks\)博士是\(BT\) (\(Bio-Tech\),生物技术) 领域的知名专家.现在,他正在为一个细胞实验做准备工作:培养细胞样本. \(Hanks\) ...

  6. 工具函数判断data为整型字符串

    /** * 如果data是整型字符串,则转为整型,否则原样返回 * @param {*} data 整型字符串 */ export const stringToInt = (data) => { ...

  7. mac idea中的文件在finder中打开

    设置工具扩展:

  8. 键盘监听事件KeyListener

    说明:按下实体按键,相应虚拟按键变绿色,释放按键,变白色.   public class Demo extends JFrame { private List<JButton> list; ...

  9. xargs与exec详解

    一.场景 这个命令是错误的 1 find ./ -perm +700 |ls -l 这样才是正确的 1 find ./ -perm +700 |xargs ls -l  二.用法 1 2 3 4 5 ...

  10. java基础基础总结----- 常用DOS命令(一)

    常用DOS命令 dir(directory):列出当前目录下的文件以及文件夹 mkdir (make directory) : 创建目录 rd (remove directory): 删除目录 cd ...