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 ...
随机推荐
- day14 装饰器模拟验证附加功能
user_list=[ {'}, {'}, {'}, {'}, ] current_dic={'username':None,'login':False} def auth_func(func): d ...
- MT【209】打破对称
设正数$a,b,c$满足$ab+bc+ca=47$,求$(a^2+5)(b^2+5)(c^2+5)$的最小值_____ 解:$(a^2+5)(b^2+5)(c^2+5)=(a^2+5)(5(b+c)^ ...
- 【UOJ#275】组合数问题(卢卡斯定理,动态规划)
[UOJ#275]组合数问题(卢卡斯定理,动态规划) 题面 UOJ 题解 数据范围很大,并且涉及的是求值,没法用矩阵乘法考虑. 发现\(k\)的限制是,\(k\)是一个质数,那么在大组合数模小质数的情 ...
- SharePoint 2013 pre-config
#region 1. add winrm, application server and web server role Add-WindowsFeature winrm-iis-ext, Appli ...
- sklearn 总结
一张思维导图总结一下用到的大体模块:
- 查询字符串(性能对比): Array Vs HashMap
ip字符串长度: 15 ip count: 25 time - array:16ms, 查询次数:25000time - map:15ms, 查询次数:25000 ip count: 42 time ...
- spring环境测试
比如有个service类:(再建个接口类) package com.tydic.jtcrm.batch.service.impl; import java.util.Map; import javax ...
- SpringMVC接受JSON参数详解及常见错误总结我改
SpringMVC接受JSON参数详解及常见错误总结 最近一段时间不想使用Session了,想感受一下Token这样比较安全,稳健的方式,顺便写一个统一的接口给浏览器还有APP.所以把一个练手项目的前 ...
- Zookeeper客户端Curator---Getting Started
先说个小插曲,前几天有个网站转载我的文章没有署名作者,我有点不开心就给他们留言了,然后今天一看他们把文章删了.其实我的意思并不是你允许转载,我想表达的是我的付出需要被尊重.也不知道是谁的错~ ==== ...
- Prometheus MySQL_exporter
MySQL Exporter mysqld_exporter是用来搜集mysql的性能指标的,适用于mysql5.5及其以上版本 程序安装 下载地址:https://prometheus.io/dow ...