码迷,mamicode.com
首页 >  
搜索关键字:rectangles    ( 210个结果
HDU2056 Rectangles 【矩形面积交】
Rectangles Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15950    Accepted Submission(s): 5104 Problem Description Given two rect...
分类:其他好文   时间:2015-01-19 10:54:40    阅读次数:168
【HDOJ】1510 White Rectangles
这个题目很好,变形的题目也很多。简单DP。 1 /* 1510 */ 2 #include 3 #include 4 #include 5 6 #define MAXN 105 7 8 char map[MAXN][MAXN]; 9 int dp[MAXN][MAXN];10 11 int...
分类:其他好文   时间:2015-01-17 15:05:04    阅读次数:138
HDU 2056 Rectangles
这题就是简单的几何题,刚接触ACM做这题时,不会写,当时想的太复杂了,把矩形的各种情况组合都考虑到了,结果发现这样太复杂就放弃了。今天做这道题时,我突然发现既然题目给的是对角线的坐标,为什么不用对角线之间的关系来判别矩形之间的位置关系呢?于是思路就很简单的涌现出来了。只要画个图,就能明白两者之间对角线的关系。 #include #include #include double _max(doub...
分类:其他好文   时间:2015-01-12 21:08:17    阅读次数:188
HTML5之Canvas画布
先上代码:浏览器不支持HTML5! - Rectangles 绘制矩形对象 - context.fillRect(x,y,w,h) // 绘制矩形 - context.strokeRect(x,y,w,h) // 绘制边框 - context.clearRect(x,y,w,h) ...
分类:Web程序   时间:2015-01-04 15:10:10    阅读次数:191
HDU2056 Rectangles【水题】【相交面积】
题目大意:给你两个矩形对角线两端的坐标,输出这两个矩形的相交面积 思路:假设两个矩形相交,则相交的矩形面积横坐标为四个横坐标中间的 两个横坐标,纵坐标为四个纵坐标中间的两个纵坐标,然后计算面积。若 两个矩形不相交,则相交面积为0.00。 那么怎么判断是否相交呢。思路很简单,分别计算出矩形1和矩形2最小和 最大和横、纵坐标,若矩形1的最小横坐标>=矩形2的最大横坐标 或者 矩形1的最大横坐标<=矩形2的最小横坐标 则两个矩形不可能相交,同理, 纵坐标也是如此。...
分类:其他好文   时间:2015-01-03 14:40:51    阅读次数:170
HDU 2056
Problem Description Given two rectangles and the coordinates of two points on the diagonals of each rectangle,you have to calculate the area of the intersected part of two rectangles. its sides are p...
分类:其他好文   时间:2014-12-29 09:07:51    阅读次数:155
Determine If Two Rectangles Overlap
判断相交的情况比较复杂,所以从判断不相交的角度考虑。! (P1.y P4.x || P2.y > P3.y || P2.x < P3.x)
分类:其他好文   时间:2014-12-18 00:01:52    阅读次数:241
android-Activity的执行流程
概述 The following diagram shows the important state paths of an Activity. The square rectangles represent callback methods you can implement to perfor....
分类:移动开发   时间:2014-12-03 20:45:59    阅读次数:182
HDU--3457--Rectangles--记忆化搜索
RectanglesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 707    Accepted Submission(s): 284 Problem DescriptionA rectangle in the Cartesian ...
分类:其他好文   时间:2014-12-01 22:29:51    阅读次数:117
poj2411
Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:12111Accepted:7058DescriptionSquares and rectangles fascinated the famous Dutch...
分类:其他好文   时间:2014-11-16 11:50:10    阅读次数:92
210条   上一页 1 ... 17 18 19 20 21 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!