码迷,mamicode.com
首页 >  
搜索关键字:csu 1547 rectangle    ( 2022个结果
Water --- CSU 1550: Simple String
Simple StringProblem's Link: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1550Mean:略。analyse:水题。Time complexity: O(n)Source code:// Memory Time...
分类:其他好文   时间:2015-03-29 23:18:15    阅读次数:222
CSU 1554 SG Value (集合类的学习)
题目大意:2种操作1 a:往集合中添加一个元素a2: 询问这个集合中的元素任意组合相加所不能得到的最小数的值这道题总是不断地去找当前所能处的最小值能否被当前的最小值加上其前部的一堆可抵达数到达当前位置也就是 minn Set、multiset都是集合类,差别在与set中不允许有重复元素,multis...
分类:其他好文   时间:2015-03-29 19:25:36    阅读次数:212
湖南多校对抗赛(2015.03.28) A Rectangle
题意:给你一些最多宽为2 的木板,让你放在一个宽为二的盒子里面,问你这个盒子最短有多长。解题思路:DP,离中间最近的那个值。解题代码: 1 // File Name: a.cpp 2 // Author: darkdream 3 // Created Time: 2015年03月28日 星期六 12...
分类:其他好文   时间:2015-03-29 09:24:06    阅读次数:109
DP——To the Max
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat...
分类:其他好文   时间:2015-03-28 21:34:43    阅读次数:127
CSU 1527 Bounty Hunter dp 双调旅行商
题目链接:点击打开链接 裸的双调旅行商问题啦 #include #include #include #include #include #include #include #include using namespace std; #define ll int #define N 550 #define inf 1152921504606846976 struct node{ ...
分类:其他好文   时间:2015-03-28 10:11:52    阅读次数:341
CSU 1531 Jewelry Exhibition 二分匹配(裸
题目链接:点击打开链接 题意: 给定[0,n] * [0,m]的二维矩阵 矩阵内有k个绿点 下面k行给出绿点坐标,(保证给出的坐标都不是整数且 0 问: 用宽度为1的刷子,一次可以把一行染色或者把一列染色 问最少要使用几次刷子 思路: 二分匹配,把所有点都映射到该点所在的方格的左下角坐标里(即舍弃小数部分) 然后就是一道经典的行列匹配,和排兵布阵一样做法。 #inclu...
分类:其他好文   时间:2015-03-28 10:11:31    阅读次数:302
CSU 1526 Beam me out! 强连通
题目链接:点击打开链接 题意: 给定n个点的有向图(1为起点,n为终点) 下面每两行给出一个点的出度和所连接的下一个点。 第n个点是没有出度的 图是这样的: 1->2, 1->3, 2->3 第一问: 若存在一种方案使得这个人进入一个点后再也不能到达终点则输出 PRISON , 否则输出 PARDON 第二问: 若这个人可以在图里走无穷步则输出UNLIMITED, 否则输出LIM...
分类:其他好文   时间:2015-03-28 10:10:02    阅读次数:339
【OpenGL基础篇】——使用面向对象方法封装OpenGL函数(三)——绘制矩形
今天实现的是在Window对象上绘制矩形,并且可以定制矩形的坐标、长宽、边框的大小的颜色、是否填充、以及填充时的颜色。 主要的思想就是先用线条绘制出边框,然后在里面绘制出矩形,再根据设定的是否填充的模式,选择此矩形的透明度,若显示,则透明度为1,;不显示,则透明度为0下面是Rectangle类的代码:/************************************************...
分类:其他好文   时间:2015-03-21 15:35:42    阅读次数:188
LeetCode – Refresh – Maximal Rectangle
This is the extension of Largest Rectangle in Histogram. We can just project 2D matrix to 1D array and compute it line by line. 1 class Solution { 2 p...
分类:其他好文   时间:2015-03-21 06:20:44    阅读次数:121
LeetCode – Refresh – Largest Rectangle in Histogram
Use two vector to record left and right indexes that can extend the blocks. 1 class Solution { 2 public: 3 int largestRectangleArea(vector &height...
分类:其他好文   时间:2015-03-20 08:02:31    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!