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 ...
随机推荐
- python 时间模块 -- time
time 时间模块 和时间有关系的我们就要用到时间模块.在使用模块之前,应该先导入模块. # 常用方法 import time print("现在执行我") time.sleep( ...
- SQL注入方法之:获取列名
select col_name(object_id('table'),1) from sysobjects where name='table'
- jupyter快捷键
jupyter快捷键(jupyter有两个模式,命令模式和编辑模式) 当前cell侧边为蓝色时,表示此时为命令模式,按Enter切换为编辑模式 当前cell侧边为绿色时,表示此时为编辑模式,按Esc切 ...
- 【POI每日题解 #5】 DWU-Double-row
题目链接 [POI2005]DWU-Double-row wwwww 之前写了半小时 一卡机 没啦QAQ 简单说一下吧 [吐血ing 这道题长得好二分图啊 所以本能地连边 一种是A边 连可交换的数对 ...
- BSGS&EXBSGS 大手拉小手,大步小步走
大步小步走算法处理这样的问题: A^x = B (mod C) 求满足条件的最小的x(可能无解) 其中,A/B/C都可以是很大的数(long long以内) 先分类考虑一下: 当(A,C)==1 即A ...
- 【POJ3061】Subsequence
题目大意:给定一个有 N 个正整数的序列,求出此序列满足和大于等于 S 的长度最短连续子序列. #include <cstdio> #include <algorithm> u ...
- 2018.10.19浪在ACM 集训队第一次测试赛
2018.10.19浪在ACM 集训队第一次测试赛 待参考资料: [1]:https://blog.csdn.net/XLno_name/article/details/78559973?utm_so ...
- UTF-8 GBK GB2312
至于UTF-8编码则是用以解决国际上字符的一种多字节编码,它对英文使用8位(即一个字节),中文使用24位(三个字节)来编码.对于英文字符较多的论坛则用UTF-8节省空间. GBK包含全部中文字符:UT ...
- pyqt4
PyQt4 工具包简介1.1 关于本指南 这是一个入门级的 PyQt 指南.其目的在于引导读者快速上手 PyQt4 工具包.该指南在 Linux 环境下创建并通过测试. 关于 PyQt PyQt 是用 ...
- python中的os模块
os模块 os模块的作用: os,语义为操作系统,所以肯定就是操作系统相关的功能了,可以处理文件和目录这些我们日常手动需要做的操作,就比如说:显示当前目录下所有文件/删除某个文件/获取文件大小…… 另 ...