码迷,mamicode.com
首页 >  
搜索关键字:rectangles    ( 210个结果
poj 2411
Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:12111Accepted:7058DescriptionSquares and rectangles fascinated the famous Dutch...
分类:其他好文   时间:2014-11-15 16:58:53    阅读次数:158
HDU-2056-Rectangles
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=2056题意 : 给你两个矩形,的两个点,每个矩形的两个点是这个矩形的对角线的两个点。把一个矩形的对角线的两个点经过如下变换即可化两点为左下,和右上的两个点。以便于解题。n1=min(x1,x2); m1.....
分类:其他好文   时间:2014-11-09 15:05:18    阅读次数:214
HDu 2830 Matrix Swapping II(dp)
Problem Description Given an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we define the maximum area of such rectangle as this ...
分类:移动开发   时间:2014-10-17 23:26:50    阅读次数:264
HDU 1056 Largest Rectangle in a Histogram(dp)(求最大的矩形面积)
Problem Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figu...
分类:其他好文   时间:2014-10-17 23:26:46    阅读次数:426
zoj 2067 - White Rectangles
题目:一个由‘.’和‘#...
分类:其他好文   时间:2014-09-27 21:46:10    阅读次数:201
HDU-4419-Colourful Rectangle(线段树)
Problem Description We use Red, Green and Blue to make new colours. See the picture below: Now give you n rectangles, the colour of them is red or green or blue. You have calculate the area ...
分类:其他好文   时间:2014-09-25 10:46:38    阅读次数:211
UVA 11930 - Rectangles(2-sat + 计算几何)
UVA 11930 - Rectangles 题目链接 题意:给定一些矩形,每个在两条对角线选一条,保证全部不相交,问可不可行(这题有坑啊,矩形不一定平行坐标轴。。。) 思路:2-sat,主对角线为true,副对角线为false,枚举两个矩形的每条对角线,利用叉积判相交,如果相交就加一条边进去,最后2-sat判定即可 代码: #include #include #...
分类:其他好文   时间:2014-09-02 12:30:34    阅读次数:237
Codeforces 372B. Counting Rectangles is Fun【动态规划,暴力枚举】(lowbit()小用法)
题目大意: 给出一个由0,1构成的矩阵,询问(a,b)到(c,d)两个点之间的只含有0的矩形有多少个。 方法: 由于矩阵不大,最多40*40,而且询问量很大(10^5)由此我们考虑o(1)输出答案,首先用一个四维数组预处理出答案,最后直接输出即可。 令dp[a][b][c][d]为(a,b)到(c,d)两个点之间的只含有0的矩形的数量, 则递推的公式: dp[a][b...
分类:其他好文   时间:2014-08-24 16:47:42    阅读次数:277
CF 372B Counting Rectangles is Fun [dp+数据维护]
题意,给出一个n行m列的矩阵 里面元素是0或者1 给出q个询问 a,b,c,d 求(a,b)到(c,d)有多少个由0组成的矩形 我们定义 即为求(a,b)到(c,d)有多少个由0组成的矩形 对一个矩形来说 dp[a][b][c][d]=dp[a][b][c][d-1]+dp[a][b][c-1][d]-dp[a][b][c-1][d-1]+包含右下角(当前点)的矩形; 重...
分类:其他好文   时间:2014-08-24 15:29:52    阅读次数:203
POJ 1856 Sea Battle(BFS).
~~~~ 题意: 给你一个R*C的图,求其由图中连通‘#“所组成的矩形的个数。  注意:If the ships were placed correctly (i.e., there are only rectangles that do not touch each other even with a corner), print the sentence "There are S shi...
分类:其他好文   时间:2014-08-13 01:16:24    阅读次数:242
210条   上一页 1 ... 18 19 20 21 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!