码迷,mamicode.com
首页 >  
搜索关键字:confusion matrix    ( 4333个结果
笔试题72. LeetCode OJ (59)
Spiral Matrix II     看上图就能知道这个提示要干什么的,给定一个 n 值,按照螺旋数组的存储特点将 1~N^2 存放到螺旋数组中。     思路:使用一个计数器(引用的方式使用),然后按照螺旋数组的方式去遍历的特点依次将该计数器的值赋给数组相应的位置,遍历完成后就是上述的样子了了,需要注意一下几点。   1.我们需要实现分配空间(讲vector的大小给定),否则肯定会崩溃...
分类:其他好文   时间:2016-06-03 19:37:55    阅读次数:112
LeetCode:Set Matrix Zeroes
Set Matrix Zeroes Total Accepted: 67555 Total Submissions: 200621 Difficulty: Medium Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in pl...
分类:其他好文   时间:2016-06-03 19:37:09    阅读次数:172
bzoj4031【HEOI2015】小Z的房间
Matrix-Tree定理+高斯消元求行列式...
分类:其他好文   时间:2016-06-03 01:18:21    阅读次数:192
【一天一道LeetCode】#73. Set Matrix Zeroes
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder‘s Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. (二)解...
分类:其他好文   时间:2016-06-02 14:28:09    阅读次数:121
【一天一道LeetCode】#74. Search a 2D Matrix
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder‘s Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the fol...
分类:其他好文   时间:2016-06-02 14:22:32    阅读次数:142
【Leetcode】Longest Increasing Path in a Matrix
题目链接:https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ 题目: Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to fou...
分类:其他好文   时间:2016-06-02 14:18:25    阅读次数:198
BZOJ 4031: [HEOI2015]小Z的房间 Matrix-Tree定理
题目链接: http://www.lydsy.com/JudgeOnline/problem.php?id=4031 题解: Matrix-tree定理解决生成树计数问题,其中用到高斯消元法求上三角矩阵,其中消元用的是辗转相除法。 代码: ...
分类:其他好文   时间:2016-06-01 19:45:27    阅读次数:186
【Leetcode】Maximal Square
题目链接:https://leetcode.com/problems/maximal-square/ 题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the...
分类:其他好文   时间:2016-05-31 06:29:17    阅读次数:172
【Leetcode】Range Sum Query 2D - Immutable
题目链接:https://leetcode.com/problems/range-sum-query-2d-immutable/ 题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and l...
分类:其他好文   时间:2016-05-31 06:28:37    阅读次数:217
【Leetcode】Spiral Matrix
题目链接:https://leetcode.com/problems/spiral-matrix/ 题目: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the followin...
分类:其他好文   时间:2016-05-30 15:31:54    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!