HDU5605——geometr
来源:互联网 发布:华为帐号无法获取数据 编辑:程序博客网 时间:2024/06/06 16:54
Problem Description
There is a point P at coordinate (x,y) .
A line goes through the point, and intersects with the postive part ofX,Y axes at point A,B .
Please calculate the minimum possible value of|PA|∗|PB| .
A line goes through the point, and intersects with the postive part of
Please calculate the minimum possible value of
Input
the first line contains a positive integer T,means the numbers of the test cases.
the next T lines there are two positive integers X,Y,means the coordinates of P.
T=500 ,0<X,Y≤10000 .
the next T lines there are two positive integers X,Y,means the coordinates of P.
Output
T lines,each line contains a number,means the answer to each test case.
Sample Input
12 1
Sample Output
4in the sample $P(2,1)$,we make the line $y=-x+3$,which intersects the positive axis of $X,Y$ at (3,0),(0,3).$|PA|=\sqrt{2},|PB|=2\sqrt{2},|PA|*|PB|=4$,the answer is checked to be the best answer.
#include<stdio.h>int main(){int t,x,y;scanf("%d",&t);while(t--){scanf("%d %d",&x,&y);printf("%d\n",2*x*y);}return 0;}
0 0
- HDU5605——geometr
- HDU5605——数学题(三角函数的应用)
- hdu5605(基本不等式)
- ————
- ————————————————FL2440初接触———————————————————
- ——!
- ——
- ————————反射
- ————————枚举
- ————————注解
- ————个人主页————
- 转载————————---多态--------------
- Android————————Handler
- 几种编码格式——————————————————————待整理
- 《——————————搭建自己的网站————————————》
- 匆匆————
- ——安意如——
- ——期刊杂志——
- okhttp的简单封装
- 线程池的那些事儿
- Maven打包时加入依赖包及加入本地依赖包
- CSS3动画属性animation的基本用法
- [珠玑之椟]浅谈代码正确性:循环不变式、断言、debug
- HDU5605——geometr
- windows编程的偏门概念: 会话(Session), 窗口站(Window Station), 桌面
- 【opencv】常用函数
- QuickSort
- 途牛原创|浅谈API安全设计
- 几种java远程调用通讯协议的比较
- 交叉编译生成模块的makefile写法
- FIR.im众测平台的集成
- Redis 高性能内存存储