码迷,mamicode.com
首页 >  
搜索关键字:zero dark matrix    ( 6343个结果
图片的旋转
知识点Matrix:旋转对象Reset:重载createBitmap:创建位图//代码示例packagecom.example.examples_05_08;importandroid.content.Context;importandroid.graphics.Bitmap;importandro...
分类:其他好文   时间:2014-06-26 17:52:57    阅读次数:157
bnu 34981 A Matrix(构造)
题目链接:bnu 34981 A Matrix 题目大意:假定有一序列,按照题目中给定的算法构造出一张二维表,现在题目给定一张二维表,要求求出序列,要求序列的倒置的字典序最大。 解题思路:构造,对于每一层来说,一定是递增的,根据算法可以得出;并且一个数被换到下一行,一定是因为有序列后面有小于自己的数,所以每一层从最后一个数开始匹配,找到上一层中比自己小的最大数字,假定是该数导致当前数被...
分类:其他好文   时间:2014-06-26 06:44:30    阅读次数:294
如何扩容swap分区
如何扩容swap分区现在swap分区有9G想要扩容为11G,磁盘空间从/home目录下提取操作步骤如下:注解:1.在空闲的分区下生成一个空文件,大小为下面命令参数中的bs*count。dd if=/dev/zero of=/opt/swapfiles bs=1024k count=20482.格式化...
分类:其他好文   时间:2014-06-25 18:37:38    阅读次数:209
改变cell的背景颜色
#defineDARK_BACKGROUND[UIColorcolorWithRed:151.0/255.0green:152.0/255.0blue:155.0/255.0alpha:1.0];-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{cell.backgroundColor=DARK_BACKGROUND;}
分类:其他好文   时间:2014-06-25 10:48:56    阅读次数:264
hdu-4405-Aeroplane chess-概率DP
还是那么做。。。 无非加了一条跳转。。。几乎都差不多。。 #include #include #include #include using namespace std; #define maxn 110000 #define eps 1e-6 #define zero(x) (fabs(x)<0?0:x) double dp[maxn]; int pre[maxn]; int n; dou...
分类:其他好文   时间:2014-06-25 00:24:29    阅读次数:351
zoj-3640-Help Me Escape-概率DP
dp[x]:能力为x的时候,逃出的期望。 则,可以根据x,来算出期望的公式。 #include #include #include #include using namespace std; #define maxn 110000 #define eps 1e-6 #define zero(x) (fabs(x)<0?0:x) double dp[maxn]; int c[maxn]; in...
分类:其他好文   时间:2014-06-24 23:43:09    阅读次数:289
POJ 2155 Matrix 【二维树状数组】
题目链接:http://poj.org/problem?id=2155 题目大意:给出一个N*N的0矩阵,下面给出两种指令:1. 给出的第一个数据为‘C’,再给出四个整形数据,x1,y1,y1,y2,对以(x1,y1)(x2,y2)分别为左上角和右下角坐标的矩阵内的元素进行反转(0变1,1变0)         2. 给出的第一个数据为‘Q’,再给出两个数据,x,y,然后输出此时这个坐标上的元素...
分类:其他好文   时间:2014-06-24 22:29:35    阅读次数:271
hdu-3853-LOOPS-概率dp
用记忆化写概率DP写的越来越纯真了。。 感觉记忆化很好写。。。 #include #include #include #include using namespace std; #define maxn 1100 #define eps 1e-6 #define zero(x) (fabs(x)<0?0:x) double mp[maxn][maxn][4]; double dp[maxn]...
分类:其他好文   时间:2014-06-24 22:07:09    阅读次数:278
Regular Expression Matching
题目 Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the ent...
分类:其他好文   时间:2014-06-24 18:43:56    阅读次数:224
hdu-4336-Card Collector-概率DP
以后还是使用递推把,不能用记忆化了,记忆化太耗时间了。。。 因为N很小,所以我们可以用状态压缩。用压缩起来的状态表示已经拥有的卡片。 然后根据状态之间的关系进行求解。 #include #include #include #include using namespace std; #define maxn 110000 #define eps 1e-6 #define zero(x) (f...
分类:其他好文   时间:2014-06-24 18:29:40    阅读次数:184
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!