码迷,mamicode.com
首页 >  
搜索关键字:hdoj matrix    ( 6780个结果
hdoj Last non-zero Digit in N! 【数论】
数论 找规律...
分类:其他好文   时间:2014-06-16 20:45:44    阅读次数:198
[matlab]改变矩阵的大小并保存到txt文件
要完成的任务是,加载一个保存在txt文件中的矩阵, 并把它扩大10倍,并且要再次保存回去 %加载txt文件 >load(‘Matrix.txt’); %扩大10倍 repmat(Matrix,row column) % 这里的matrix 参数是要对其进行修改的matrix, 其中row是要新建的一...
分类:其他好文   时间:2014-06-15 22:02:20    阅读次数:756
poj 3233 Matrix Power Series(等比矩阵求和)
http://poj.org/problem?id=3233 ps转: 用二分方法求等比数列前n项和:即   原理:   (1)若n==0   (2)若n%2==0     (3)若n%2==1 代码如下: LL sum(LL p,LL n) { if(n==0) return 1; i...
分类:其他好文   时间:2014-06-15 20:01:44    阅读次数:210
【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 from left to right.The first integer of each...
分类:其他好文   时间:2014-06-15 14:12:44    阅读次数:238
c/c++中读取和写入mat文件 --- MAT File I/O Library(二)
本篇记述c/c++中读取mat文件示例测试数据matioTest.zip下载地址:http://pan.baidu.com/s/1sjPkMsd1. 读取matioTest.zip中s.mat文件,数据为普通matrix 1 #include 2 #include 3 #include 4 ...
分类:编程语言   时间:2014-06-15 11:00:47    阅读次数:448
【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? 思路:第一种思路是一层一层的进行旋转,比较直观,但是花费的时间要久一些;第二种思路则比较取巧,首先沿着...
分类:其他好文   时间:2014-06-15 08:46:26    阅读次数:170
Leetcode:Spiral Matrix 螺旋矩阵
Spiral Matrix:Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:...
分类:其他好文   时间:2014-06-14 21:42:10    阅读次数:309
剑指offer (20) 打印螺旋矩阵
题目描述:输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字class Solution {public: vector spiralOrder(vector > &matrix) { vector result; int nRows = matrix.s...
分类:其他好文   时间:2014-06-14 21:27:53    阅读次数:156
android矩阵详解
android中矩阵的使用介绍,以及matrix中的主要函数的介绍...
分类:移动开发   时间:2014-06-14 14:16:33    阅读次数:255
矩阵快速幂
复杂度为o(n^3logk) /* 求 a^k % mod,其中a是n*n的矩阵 */ const int mod = 10000; const int maxn = 2; _LL k; int n; struct matrix { _LL mat[maxn][maxn]; } a,res; matrix mul(matrix x, matrix y) { matrix tmp...
分类:其他好文   时间:2014-06-14 07:46:19    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!