码迷,mamicode.com
首页 >  
搜索关键字:mat    ( 14954个结果
公约数和公倍数
#include#includeint main(){ int n; int a,b,r; int p,t; scanf("%d",&n); while(n--) { scanf("%d %d",&a,&b); if(a<b) { t=a; a=b...
分类:其他好文   时间:2014-07-27 22:21:19    阅读次数:186
matlab调试补充总结
还有一种条件断点,比如在循环中,循环次数大于某一个数时才停止,可以通过debug菜单中的Set/Modify Conditional Breakpoints设置和修改,实现方式和上述独立断点类似需要注意的是,matlab在进入debug模式后,在命令窗口会出现"K >>"标记符号,这时仍然可以再命令...
分类:其他好文   时间:2014-07-25 16:41:41    阅读次数:308
DecimalFormat 中的 #,0
0和#都是占位符,但在不同的地方,作用不一样0: 比实际数字的位数多,不足的地方用0补上。 new DecimalFormat("00.00").format(3.14) //结果:03.14 new DecimalFormat("0.000").format(3.14) //结果: 3.140 ....
分类:其他好文   时间:2014-07-24 21:53:32    阅读次数:202
【HDOJ】2371 Decode the Strings
快速矩阵乘法。注意,原始字符串即为decode后的字符串。题目是要找到原始串。 1 #include 2 #include 3 4 #define MAXN 85 5 6 typedef struct { 7 char m[MAXN][MAXN]; 8 } mat_st; 9 10 ...
分类:其他好文   时间:2014-07-23 12:38:56    阅读次数:259
android-exploitme(八):内存保护
如果一个手机被锁屏了,但是有个app还在后台运行,这个时候你想知道些app的信息,需要分析他的内存状态。1. 首先运行模拟器,打开emm,使得模拟器返回锁屏状态2. 打开ddms,下载内存文件3. 下载下来的文件是java格式的,需要用工具将他转换为dalvik格式4. 使用mat打开转后的文件,*...
分类:移动开发   时间:2014-07-22 22:36:35    阅读次数:298
运算符重载
加法还可用友元函数,两个参数的方式实现。#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
初识Python
看了一点Python的知识点,写了一段代码来加深理解:# -*- coding:cp936 -*-print ('此计算器为理想状态下基金定投的收益计算')print ('计算公式:M=12a(1+x)[-1+(1+x)^n]/x')print ('M:预期收益')print ('a:每月定投金额'...
分类:编程语言   时间:2014-07-22 00:11:34    阅读次数:207
DAG镶嵌模型+原始路径打印
DP矩形镶嵌,打印路径与最长公共子序列相似。 1 #include 2 #include 3 #define doumax(a,b) (a>b?a:b) 4 const int maxn=100; 5 int mat[maxn][maxn],dp[maxn],n; 6 struct node{ 7 ...
分类:其他好文   时间:2014-07-21 14:36:28    阅读次数:387
UVA 11149 - Power of Matrix(矩阵倍增)
UVA 11149 - Power of Matrix 题目链接 题意:给定一个n*n的矩阵A和k,求∑kiAi 思路:利用倍增去搞,∑kiAi=(1+Ak/2)∑k/2iAi,不断二分即可 代码: #include #include const int N = 45; int n, k; struct mat { int v[N][N]; mat() ...
分类:其他好文   时间:2014-07-20 23:07:20    阅读次数:274
分支语句横向对比
VERILOG:case(a) 1'b0: begin end 1'b1: begin endendcaseif() begin endelse begin if() begin end else begin en...
分类:其他好文   时间:2014-07-20 21:34:35    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!