Problem Description
There is a point P at coordinate (x,y). A line goes through the point, and intersects with the postive part of X,Y axes at point A,B. Please calculate the minimum possible value of |PA|∗|PB|.
 
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.
 
Output
T lines,each line contains a number,means the answer to each test case.
 

简单推理,来自官方题解:

 #pragma comment(linker, "/STACK:1024000000,1024000000")
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<queue>
#include<set>
#include<bitset>
#include<map>
#include<vector>
#include<stdlib.h>
using namespace std;
#define ll long long
#define eps 1e-10
#define MOD 1000000007
#define N 1000000
#define inf 1e12
int x,y;
int main()
{
int t;
scanf("%d",&t);
while(t--){
scanf("%d%d",&x,&y);
printf("%d\n",*x*y); }
return ;
}

hdu 5605 geometry(几何,数学)的更多相关文章

  1. B. Tell Your World(几何数学 + 思维)

    B. Tell Your World time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  2. C. Polygon for the Angle 几何数学

    C. Polygon for the Angle 几何数学 题意 给出一个度数 ,问可以实现的最小的n的n边形是多少 思路 由n边形的外角和是180度直接就可以算出最小的角是多少 如果给出的度数是其最 ...

  3. HDU - 6242 Geometry Problem (几何,思维,随机)

    Geometry Problem HDU - 6242 Alice is interesting in computation geometry problem recently. She found ...

  4. BestCoder Round #68 (div.2) geometry(hdu 5605)

    geometry Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Su ...

  5. PostGIS解析Geometry几何对象

    一.Geometry转WKT select st_astext(geom) where tableName; 二.PostGIS常用函数 wkt转geometry st_geomfromtext(wk ...

  6. HDU 4816 Bathysphere(数学)(2013 Asia Regional Changchun)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4816 Problem Description The Bathysphere is a spheric ...

  7. HDU 5584 LCM Walk 数学

    LCM Walk Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5584 ...

  8. HDU 4336 Card Collector 数学期望(容斥原理)

    题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=4336 题意简单,直接用容斥原理即可 AC代码: #include <iostream> ...

  9. HDU 5570 balls 期望 数学

    balls Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5570 De ...

随机推荐

  1. Jquery EasyUI修改行背景的两种方式

    1.数据加载完成不请求后台的做法 方式一: //更改表格行背景 function changeLineStyle(index){ var rows=$("#alertGird"). ...

  2. JavaScript 轮播图

    这是我自己做的一个轮播图,大家可以看看 ,我还没进行优化.有改进的地方可以私聊 布局什么的你们自己搞定吧 <div class="slider" id="circl ...

  3. DataReader、Table、DataSet和Entity相互转化

    public class CommonService { #region DataReader转化 /// <summary> /// 将DataReader转化为Table /// &l ...

  4. Java程序猿的JavaScript学习笔记(汇总文件夹)

    最终完结了,历时半个月. 内容包含: JavaScript面向对象特性分析,JavaScript高手必经之路. jQuery源代码级解析. jQuery EasyUI源代码级解析. Java程序猿的J ...

  5. minicom与USB转串口

    实验器材:mini6410 连接方式:ARM板通过USB转串口线连接到pc机 下面是具体的设置了. 默认情况下,UBUNTU安装了USB转串口驱动(pl2303). 1.# lsmod | grep ...

  6. 【错排问题】【HDU2048】神、上帝以及老天爷

    神.上帝以及老天爷 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total ...

  7. LINQ 基本子句之三 let

    let子句,可以作为临时变量储存表达式的结果,但是let子句一旦初始化后无法再次进行更改. 1. static void Main(string[] args) { string[] names = ...

  8. CSS学习笔记——盒模型,块级元素和行内元素的区别和特性

    今天本来打算根据自己的计划进行前端自动化的学习的,无奈早上接到一个任务需求需要新增一个页面.自从因为工作需要转前端之后,自己的主要注意力几 乎都放在JavaScript上面了,对CSS和HTML这方面 ...

  9. Android服务之AIDL

    在android开发过程中,为了让其他的应用程序,也可以访问本应用程序的服务,android系统采用远程过程调用来实现.android通过接口来公开定义的服务.我们将能够夸进程访问的服务成为AIDL服 ...

  10. Java的动态代理机制详解(转)

    在学习Spring的时候,我们知道Spring主要有两大思想,一个是IoC,另一个就是AOP,对于IoC,依赖注入就不用多说了,而对于Spring的核心AOP来说,我们不但要知道怎么通过AOP来满足的 ...