Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:
其他好文 时间:
2014-07-22 22:53:14
阅读次数:
184
有了mat、同时我们发现Java有提供jvisualvm,jvisualvm是一个不错的工具: heap dump 、 thread dump、 cpu/mem profile 无所不能。不过观察发现,对同一个java程序,其导出的hrof格式数据跟jmap导出的bin格式数据有所不同,比如Stri...
分类:
编程语言 时间:
2014-07-22 22:50:33
阅读次数:
368
向下取整 floor (地板) import?math
math.floor(-2.2)
#?-3.0
math.floor(2.2)
#?2.0 向上取整 ceil (天花板) import?math?
math.ceil(-2.2)
#?-2.0
math.ceil(2.2)
#?3.0 舍入 round round(2.24,?1)
...
分类:
其他好文 时间:
2014-07-21 10:24:47
阅读次数:
209
DAG嵌套模型,状态方程由1改成高度就行。 1 #include 2 #include 3 #include 4 #define doumax(a,b) (a>b?a:b) 5 const int maxn=100; 6 int mat[maxn][maxn],dp[maxn],n,a[35][5]...
分类:
其他好文 时间:
2014-07-19 15:04:56
阅读次数:
234
下面得到这段代码可以用在很多地方:只需要自己修改下接Ok. 1 struct Matrix 2 { 3 long long mat[N][N]; 4 Matrix operator*(const Matrix m)const//定义矩阵乘法的运算符* 5 { 6 ...
分类:
其他好文 时间:
2014-07-19 00:22:01
阅读次数:
187
1.原题展示:一根棒子上有n个环(n 2 #include 3 #include 4 #define size 3 5 #define mod 200907 6 struct Mat 7 { 8 long long num[size][size]; 9 };10 Mat init,r;//定义全局变...
分类:
其他好文 时间:
2014-07-19 00:19:38
阅读次数:
202
油田问题,有点像图像处理里的区域生长问题,找油田块数。BFS,DFS都可以。 1 /*BFS*/ 2 #include 3 #include 4 const int maxn=100+5,maxm=1000; 5 int m,n,vis[maxn][maxn],mat[maxn][maxn],dir...
分类:
其他好文 时间:
2014-07-18 16:19:41
阅读次数:
267
BFS题,只是没有目标位置,只需记下走过的黑色的块数就行 1 #include 2 #include 3 const int maxn=1000,maxm=25; 4 int vis[maxm][maxm],mat[maxm][maxm],dir[5][3]={{1,0},{0,-1},{-1,0}...
分类:
其他好文 时间:
2014-07-18 16:12:09
阅读次数:
267
On a32-bitmachine:Any CPU: runs as a 32-bit process, can loadAny CPUandx86assemblies, will getBadImageFormatExceptionif it tries to load anx64assembly...
分类:
其他好文 时间:
2014-07-17 10:00:48
阅读次数:
235
手把手教你uiautomator_android自动化测试第一个示例android的自动化测试方案,弄了好久了。Google在sdk4.0以后提供了一个自动化解决方案uiautomator:优点:可以跨应用了;这可是亲生的;缺点:必须sdk4.0以上版本;要想实现的好,最好有开发配合;java项目编...
分类:
移动开发 时间:
2014-07-16 16:04:04
阅读次数:
447