码迷,mamicode.com
首页 >  
搜索关键字:confusion matrix    ( 4333个结果
Leetcode: Rotate Image
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?抠细节的题,题目思想如下:to...
分类:其他好文   时间:2014-06-28 22:11:37    阅读次数:214
POJ 3070 Fibonacci(矩阵快速幂)
题目链接题意 : 用矩阵相乘求斐波那契数的后四位。思路 :基本上纯矩阵快速幂。 1 //3070 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct Matrix 9 {10 int v[2][2...
分类:其他好文   时间:2014-06-28 17:48:14    阅读次数:214
POJ 3318 Matrix Multiplication(矩阵乘法)
题目链接题意 : 给你三个n维矩阵,让你判断A*B是否等于C。思路 :优化将二维转化成一维的。随机生成一个一维向量d,使得A*(B*d)=C*d,多次生成多次测试即可使错误概率大大减小。 1 //3318 2 #include 3 #include 4 #include 5 #include ...
分类:其他好文   时间:2014-06-28 17:00:21    阅读次数:133
【leetcode】Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2014-06-28 15:14:05    阅读次数:194
poj3422 Kaka's Matrix Travels(最小费用最大流问题)
1 /* 2 poj3422 Kaka's Matrix Travels 3 不知道 k次 dp做为什么不对??? 4 看了大牛的代码,才知道还可以这样做! 5 开始没有理解将a 和 a‘ 之间建立怎样的两条边,导致程序一直陷入死循环,真心花了好长时间,快崩溃了。无语..... ...
分类:其他好文   时间:2014-06-28 11:41:06    阅读次数:300
Unity3D Physics Keynote
【Unity3D Physics Keynote】1、在哪设置Layer Collision Matrix? "Edit"->"Project Settings"->"Physics"。 2、“Import Package”->"Physic Meterial",是Unity自带的物理材质包。3.....
分类:其他好文   时间:2014-06-28 11:12:40    阅读次数:221
[LeetCode] Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted fr...
分类:其他好文   时间:2014-06-20 15:29:46    阅读次数:233
【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. Could you devise a constant space solution? 思路:因为需要遍历整个矩阵,时间复杂度肯定需要O(m * n),对于空间复杂度而言,第一种是可以使用O(m * n),...
分类:其他好文   时间:2014-06-18 12:33:39    阅读次数:167
2875: [Noi2012]随机数生成器 - BZOJ
DescriptionInput包含6个用空格分割的m,a,c,X0,n和g,其中a,c,X0是非负整数,m,n,g是正整数。Output输出一个数,即Xn mod gSample Input11 8 7 1 5 3Sample Output2快速幂+快速乘 1 type 2 matrix=...
分类:其他好文   时间:2014-06-18 09:32:46    阅读次数:179
高斯消元模版
矩阵的秩 typedef int Matrix[maxn][maxn]; int rank(Matrix A, int m, int n) { int i = 0, j = 0, k, r, u; while(i < m && j < n) { r = i; for(k = i; k < m; k++) if(A[k][j]) { r = k; brea...
分类:其他好文   时间:2014-06-17 19:03:00    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!