G - Preparing for Exams
题目链接:
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的更多相关文章
- Codeforces Round #481 (Div. 3) G. Petya's Exams
http://codeforces.com/contest/978/problem/G 感冒是真的受不了...敲代码都没力气... 题目大意: 期末复习周,一共持续n天,有m场考试 每场考试有如下信息 ...
- Codeforces Round #481 (Div. 3) G. Petya's Exams (贪心,模拟)
题意:你有\(n\)天的时间,这段时间中你有\(m\)长考试,\(s\)表示宣布考试的日期,\(d\)表示考试的时间,\(c\)表示需要准备时间,如果你不能准备好所有考试,输出\(-1\),否则输出你 ...
- 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 ...
- CF732D. Exams[二分答案 贪心]
D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...
- 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 ...
- Exams
Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output s ...
- CodeForces 732D Exams
D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...
- 【37.50%】【codeforces 732D】Exams
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...
- CF732D Exams 题解
CF732D Exams 题目描述 Vasiliy has an exam period which will continue for \(n\) days. He has to pass exam ...
随机推荐
- LightOJ - 1265 (概率)
题意: 1.两只老虎相遇 就互相残杀 2.老虎与鹿相遇 鹿死 3.老虎与人相遇 人死 4.人与鹿相遇 鹿死 5.鹿与鹿相遇 无果 求人活的概率 解析:如果老虎为0 则人活得概率为1 ...
- day7 笔记
二进制-----> ASCLL :只能存英文和拉丁字符.-----> gb2312 :只有6700来个中文字符,1980年-----> gbk1.0 :存了2w多字符 ,1995年- ...
- MT【46】不动点,稳定点几何直观
评:不动点概念在数列的一类题中也是非常有用的.
- 【LightOJ 1136】Division by 3(简单数学)
BUPT2017 wintertraining(16) #5 C HDU - 1021 题意 1, 12, 123, 1234, ..., 12345678910, ... 问第a到第b个数(incl ...
- [转]GDB
gdb调试coredump文件 gcc -g main.c //在目标文件加入源代码的信息 gdb a.out (gdb) start //开始调试 (gdb) n //一条一条执行 (gdb) st ...
- Min_25 筛
Min_25 筛 yyb好神仙啊 干什么用的 可以在\(O(\frac{n^{\frac 34}}{\log n})\)的时间内求积性函数\(f(x)\)的前缀和. 别问我为什么是这个复杂度 要求\( ...
- ARC062 - F. Painting Graphs with AtCoDeer (Polya+点双联通分量)
似乎好久都没写博客了....赶快来补一篇 题意 给你一个 \(n\) 个点 , 没有重边和自环的图 . 有 \(m\) 条边 , 每条边可以染 \(1 \to k\) 中的一种颜色 . 对于任意一个简 ...
- 16 利用Zabbix完成windows监控
点击返回:自学Zabbix之路 16 利用Zabbix完成windows监控 1.安装zabbix_agentd 1.1.下载zabbix_agentd监控客户端软件安装包(windows操作系统客户 ...
- 【BZOJ3879】SvT(后缀自动机,虚树)
[BZOJ3879]SvT(后缀自动机,虚树) 题面 BZOJ 题解 看着这个东西,询问若干个前缀两两之间的\(lcp\)? 显然\(lcp\)就是\(SAM\)构建出来的\(parent\)数上的\ ...
- CF 1023
昨天晚上打的一场CF,口胡一下前4题吧. A要注意细节,先找*,如果没有就判两者相等. 然后注意长度n - 1 <= m,然后前后比较,最后判断中间是不是字母. B先判断有没有解,然后求出 k ...