码迷,mamicode.com
首页 >  
搜索关键字:confusion matrix    ( 4333个结果
[LeetCode] Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space...
分类:其他好文   时间:2014-07-26 14:29:30    阅读次数:183
Maximal Rectangle leetcode java
题目:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.题解:这道题可以应用之前解过的Largetst Recta....
分类:编程语言   时间:2014-07-26 09:55:57    阅读次数:301
poj2155--Matrix(二维树状数组)
二维树状数组 poj2155...
分类:其他好文   时间:2014-07-26 02:08:16    阅读次数:241
【leetcode刷题笔记】Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.题解,很巧妙的一道题,对于一个0-1矩阵,它的每一行及以上都可以看...
分类:其他好文   时间:2014-07-25 10:53:01    阅读次数:292
POJ 2135 Farm Tour && HDU 2686 Matrix && HDU 3376 Matrix Again 费用流求来回最短路
累了就要写题解,最近总是被虐到没脾气。 来回最短路问题貌似也可以用DP来搞,不过拿费用流还是很方便的。 可以转化成求满流为2 的最小花费。一般做法为拆点,对于 i 拆为2*i 和 2*i+1,然后连一条流量为1(花费根据题意来定) 的边来控制每个点只能通过一次。 额外添加source和sink来控制满流为2。 代码都雷同,以HDU3376为例。 #include #include #...
分类:其他好文   时间:2014-07-23 22:40:08    阅读次数:560
LeetCode_53spiralOrder [Spiral Matrix]
#pragma warning(disable:4996) #include <cstdio> #include <Windows.h> #include <tchar.h> #include <vector> using namespace std; /* submit time : 2 1. Runtime Error [] request : Given a ma...
分类:其他好文   时间:2014-07-23 21:34:35    阅读次数:274
Matrix 二维树状数组的第二类应用
MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:17976Accepted:6737DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i,...
分类:其他好文   时间:2014-07-23 14:47:26    阅读次数:265
ImageView的属性android:scaleType设置最佳比例图片显示
实现图片轮播,以前的大图片比例会在GuideGallery中自动缩放,后来编辑把图片大小修改了。在大屏不能适应屏幕。试了很多方法终于解决。先说Imageview的属性。可在java代码中实现,也可以在Xml文件中设置。 imageView.setScaleType(ImageView.ScaleType.FIT_XY ); 这里我们重点理解ImageView的属性android:scaleTy...
分类:移动开发   时间:2014-07-23 13:12:06    阅读次数:235
运算符重载
加法还可用友元函数,两个参数的方式实现。#include #include #include #include using namespace std;class Matrix{public: Matrix(){memset(this->_mat,0,sizeof(this->_mat));}...
分类:其他好文   时间:2014-07-22 22:34:53    阅读次数:262
利用Matrix实现图片倒影效果
利用matrix可以实现各种图片的特效,今天就用marix加上渐变色实现图片倒影的效果,步骤如下: ?1. 获取需要倒影效果的图片,这里取原图片的一半 ?2. 添加颜色渐变到倒影图片上 ? 具体的实现如下面代码所述...
分类:其他好文   时间:2014-07-22 22:32:53    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!