codeforces div2 #152 小结
来源:互联网 发布:上瘾网络剧15在线观看 编辑:程序博客网 时间:2024/04/28 05:28
这次比赛题目明显较长,自己没耐心读题,心还是太急了。
给自己总结了几个缺点:
1.心太急,总想侥幸过掉。
2.本能觉得有些题目很简单,考虑不充分,没想好思路就敲。
3.草稿纸要书写规范,以免重复计算。
4.题目长就耐心读题,没什么好抱怨的。
5.独立思考能力还不够,总想依赖别人。
日后做题要尽量避免这些情况。
C题严重考虑错误。
View Code
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;int main(){ int i, j; double y1, y2, yw, x, y, r; scanf("%lf%lf%lf%lf%lf%lf", &y1, &y2, &yw, &x, &y, &r); if(y2-y1<= 2*r) {puts("-1"); return 0;} yw -= r; y1 += r; double x0 = (yw-y1) * x /(2*yw-y1-y); //相似 double d2 = x0*x0 *(y2-y1)*(y2-y1)/(x0*x0+(yw-y1)*(yw-y1)); //相似 if(d2 < r*r) puts("-1"); // d2 为 d^2 与 r*r比较 else printf("%.10f\n", x0); return 0;}
- codeforces div2 #152 小结
- codeforces #78 div2 C
- codeforces 83div2
- 【codeforces #91 div2】
- codeforces 105 div2 A
- codeforces 105 div2 B
- CodeForces #120 DIV2
- Codeforces---125--div2--总结
- Codeforces-127-div2
- codeforces-div2-128
- codeforces-div2-134
- Codeforces 135 div2
- codeforces 137 div2
- Codeforces #137 div2
- Codeforces #49 div2
- codeforces 145 div2 A
- codeforces #147(div2)
- codeforces 148 div2 B
- POJ 2528 Mayor posters 线段树 成段更新
- POJ 3225 Help with Intervals 线段树 成段更新
- WIN7搜索工具
- POJ 1436 Horizontally Visible Segments 线段树 成段更新
- POJ 3667 Hotel 线段树 区间合并 入门题
- codeforces div2 #152 小结
- HDU 1576 A/B 扩展欧几里德算法 模线性方程入门题
- CGI原理及其性能
- codeforces 251A Points on Line 二分 or 单调队列
- codeforces 252B Unsorting Array 暴力+贪心
- codeforces 251B Playing with Permutations 模拟
- codeforces 253D 单调队列 好题
- Centos 6下配置SCST<iSCSi>
- ZSTU 3194 复数的幂 二分幂