摘要: 游程编码是对数据压缩的一种方式,这写了一个简单的二值游程编码程序,程序功能如:原始输入:0001110011010100001100 ,压缩之后输出:33221111422也就是相当于记录每个值连续出现的次数,作为编码值。#include <iostream>#include <string>#include <vector>#include <queue>#include <iterator>using namespace std;int main(){ string str("0001110011010100001100 阅读全文
posted @ 2012-06-27 22:28 KingsLanding 阅读(1579) 评论(0) 推荐(0) 编辑
摘要: 最近C++程序写的比较少,需要平时多写才行啊。写了一个大整数运算的程序。#include <iostream>#include <vector>#include <cstring>#include <algorithm>#include <ostream>using namespace std;typedef vector<int>::iterator Iter;class bign{ public: bign() { num.clear(); } bign(int n) { ... 阅读全文
posted @ 2012-06-27 21:37 KingsLanding 阅读(3633) 评论(0) 推荐(0) 编辑