列表:定义:一组有序的数据;function List() { this.listSize = 0; this.pos = 0; this.dataStore = []; this.find = find; .........................}方法:append:...
分类:
Web程序 时间:
2014-10-13 11:33:19
阅读次数:
244
注意中间的减枝,还需要用一个tr[i]记录结点的值,用col[i]记录结点区间是否被全覆盖。
#include
#include
#include
using namespace std;
const int maxn = 111111;
const int maxd = 100001;
#define lson pos<<1
#define rson pos<<1|1
int col[maxn...
分类:
其他好文 时间:
2014-10-12 19:28:38
阅读次数:
232
就最终的结果来看,其实就是一个小的错误。
但定位错误的时间比较漫长了。。。
背景:出错的代码是 一段运行在 linux 服务器上的程序,程序的主要功能是处理银行pos刷卡记录并做一些计算,最后汇总、格式化输出。
该公司是和银行打交道的,接的项目都是银行的。
第二天老板就给了我一个2000多行的纯c程序,一个测试出错的测试文档 和 出错的输出结果。
由于历史的原因。。。。。该段程序...
分类:
其他好文 时间:
2014-10-10 17:49:04
阅读次数:
201
题目大意:给定n个数和两个长度为n*5的序列,每个数恰好出现5次,求两个序列的LCS
n
所以我们考虑LCS的一些性质
LCS的决策+1的条件是a[i]==b[j] 于是我们记录a序列中每个数的5个位置
扫一下b[i] 对于每个b[i]找到b[i]在a中的5个位置 这5个位置的每个f[pos]值都可以被b[i]更新 于是找到f[1]到f[pos-1]的最大值+1 更新f[pos]即可
这...
分类:
其他好文 时间:
2014-10-10 12:52:34
阅读次数:
172
#include #include #include #include using namespace std;int map[1010][1010];int dis[1010];int n,pos,sum;void init(){ for(int i=0; i> t >> n; pos = n; ...
分类:
其他好文 时间:
2014-10-10 11:50:04
阅读次数:
158
今天在操作 innobackupex 的时候,执行 change master to 的时候发现 xtrabackup_binlog_pos_innodb xtrabackup_binlog_info 两个文件对应的master 的 binary log 位置不一致:less xtrabackup....
分类:
数据库 时间:
2014-10-09 22:51:47
阅读次数:
201
#pragma mark - 通过控件获取cell-(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id)sender { CGPoint pos = [sender convertPoint:CGPoi....
分类:
其他好文 时间:
2014-10-09 22:41:57
阅读次数:
188
题目链接:啊哈哈,选我选我思路是:相当于模拟约瑟夫环,仅仅只是是从顺逆时针同一时候进行的,然后就是顺逆时针走能够编写一个函数,仅仅只是是走的方向的标志变量相反。。还有就是为了(pos+flag+n-1)%n+1的妙用。。。题目:The Dole QueueIn a serious attempt t...
分类:
其他好文 时间:
2014-10-09 22:35:57
阅读次数:
226
erase函数的原型如下:(1)string& erase ( size_t pos = 0, size_t n = npos );(2)iterator erase ( iterator position );(3)iterator erase ( iterator first, iterator...
分类:
编程语言 时间:
2014-10-09 15:33:54
阅读次数:
268
SendMessage、PostMessage原理本文解说SendMessage、PostMessage两个函数的实现原理,分为三个步骤进行解说,分别适合0基础、中级、高级程序猿进行理解,三个步骤分别为:1、SendMessage、PostMessage的执行机制。2、SendMessage、Pos...
分类:
其他好文 时间:
2014-10-09 14:34:03
阅读次数:
179