码迷,mamicode.com
首页 >  
搜索关键字:hdoj matrix    ( 6780个结果
Matlab Galois Field arrays
Operations supported for Galois Field arrays: + - - Addition and subtraction of Galois arrays. * / \ - Matrix multiplication...
分类:其他好文   时间:2014-04-30 02:05:12    阅读次数:627
【HDOJ】1978 How many ways
DFS。 1 #include 2 #include 3 4 #define MAXNUM 105 5 6 int map[MAXNUM][MAXNUM], ways[MAXNUM][MAXNUM], n, m; 7 8 int dfs(int x, int y) { 9 int ...
分类:其他好文   时间:2014-04-29 23:21:58    阅读次数:383
《Cracking the Coding Interview》——第18章:难题——题目12
2014-04-29 04:36题目:最大子数组和的二位扩展:最大子矩阵和。解法:一个维度上进行枚举,复杂度O(n^2);另一个维度执行最大子数组和算法,复杂度O(n)。总体时间复杂度为O(n^3),还需要O(n)额外空间。代码: 1 // 18.12 Given an n x n matrix, ...
分类:其他好文   时间:2014-04-29 14:24:06    阅读次数:404
【HDOJ】2157 How many ways??
矩阵乘法,用DP做各种wa,后来发现原因了。 1 #include 2 #include 3 4 typedef struct { 5 int map[20][20]; 6 } matrix_st; 7 8 matrix_st res, org; 9 int n, m;10 11 m...
分类:其他好文   时间:2014-04-29 11:26:46    阅读次数:418
【leetcode刷题笔记】Spiral Matrix
Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],...
分类:其他好文   时间:2014-04-29 10:37:46    阅读次数:434
Android 自定义Gallery浏览图片
之前写的《Android ImageSwitcher和Gallery的使用》一文中提到我在教室一下午为实现那个效果找各种资料。期间在网上找了一个个人觉得比较不错的效果,现在贴图上来:其实这个效果使用的知识点就是图像的获取、创建、缩放、旋转、Matrix类、Canvas类等,另外就是自定义的Galle...
分类:移动开发   时间:2014-04-28 16:06:46    阅读次数:714
【HDOJ】1753 大明A+B
注意数据格式,可以是整数,并且注意输出最简化浮点数。 1 #include 2 #include 3 4 #define MAXNUM 420 5 6 char a[MAXNUM], b[MAXNUM], c[MAXNUM], d[MAXNUM]; 7 int lena, le...
分类:其他好文   时间:2014-04-28 14:14:34    阅读次数:335
HDOJ 3790 双权值Dijkstra
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int INF = 1000000; 8 const int MAXSIZE = 1005; 9 10 int map[MAXSIZE...
分类:其他好文   时间:2014-04-28 09:34:15    阅读次数:558
InPlace Transition of a matrix
Problem illustration:given a n*n matrix, print its transition, for example , 90 degree clockwise,using only constant additional spaceanalysis:using O(...
分类:其他好文   时间:2014-04-28 03:22:07    阅读次数:513
HDOJ 1217 Floyed Template
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 mapname; 9 const int INF = 1000000;10 const int MAXSIZE = 1005...
分类:其他好文   时间:2014-04-27 21:03:01    阅读次数:552
6780条   上一页 1 ... 676 677 678
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!