codeforces #120 div2 B. Surrounded
来源:互联网 发布:软件质量保证措施 编辑:程序博客网 时间:2024/05/03 18:06
水题....关键是没看懂题意
链接http://codeforces.com/contest/190/problem/B
求两个圆相夹的圆的半径
而且两个圆相交的时候输入0
一共3个情况
链接http://codeforces.com/contest/190/problem/B
求两个圆相夹的圆的半径
而且两个圆相交的时候输入0
一共3个情况
代码:
#include <stdio.h>#include <math.h>int main(){ double x1,y1,z1,x2,y2,z2,sign; while(scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&z1,&x2,&y2,&z2)==6) { double num=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); if(z1>num+z2||z2>num+z1) { if(z1>num+z2) sign=(z1-num-z2)/2.0; if(z2>num+z1) sign=(z2-num-z1)/2.0; } else if(z1>num||z2>num||z1+z2>num) sign=0; else sign=fabs(num-z1-z2)/2.0; printf("%.15f\n",sign); }}
- codeforces #120 div2 B. Surrounded
- codeforces 105 div2 B
- codeforces 148 div2 B
- Codeforces #103 div2 B
- codeforces 257 div2 B
- Codeforces #263 Div2 B
- codeforces #Round354-div2-B
- codeforces #383 (div2) B
- Codeforces #165 div2 B Multithreading
- codeforces div2 round#231 B
- codeforces div2 round#230 B
- Codeforces 201(DIV2)B
- codeforces 260 div2 B题
- codeforces#336 div2 A,B
- Codeforces Round #421(Div2) B
- Codeforces Round #429 (Div2) B
- codeforces 363B round211 div2 B. Fence
- codeforces 363B round211 div2 B. Fence
- 用模式窗口, 在主页面和子页面中互相传值
- 知名网站的技术发展历程
- topcoder SRM 543 div2 250
- topcoder SRM 541 div2 250
- J2SE下的路径问题
- codeforces #120 div2 B. Surrounded
- 流体模拟技术
- 数据越权访问,谁之错?
- Codeforces Round #119 (Div. 2) B. Counting Rhombi
- 关于网络的知识
- 从今天开始
- 增强for循环
- eclipse alt+/失效解决办法
- hdu rightmost digit 1061