读取条空比例
来源:互联网 发布:长春绝命毒师网络比赛 编辑:程序博客网 时间:2024/05/07 05:08
对于一组01数据,计算它的宽度,以1为开头。
#include <iostream>using name space std;int main(){ int message[] = { 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1}; int size = sizeof(message) / sizeof(int); int * countTransition = new int[size]; memset(countTransition, 0, sizeof(int)*size); int currentState = 0; for(int i = 0; i< size; i++) { if(message[i]) { if((currentState & 1) == 1) currentState ++; countTransition[currentState] ++; } else { if((currentState & 1) == 0) currentState ++; countTransition[currentState] ++; } } int num = currentState + 1; for(int i = 0; i < num; i++) { cout << countTransition[i] << endl; } delete[]countTransition; return 0;}
0 0
- 读取条空比例
- 给视频图像添加滚动条,是的用户可以动态调节缩放比例,缩放比例取值为2-8
- 读取单条数据库信息
- OleDb读取excel中出现空值
- action中 读取 form, 空值情况
- 读取Excel时数据为空
- 【OpenCV】imread读取数据为空
- Android SQLite Cursor读取空表出错
- POI读取Excel时报空指针错误
- 读取字段为空值的方法
- 读取plist的值为空
- pugixml读取XML中文时为空
- OC中解档读取内容为空
- asp读取数据库判断是否为空
- tealeg/xlsx遇到读取空表格错误
- MATLAB读取摄像头,InstalledAdaptors为空
- R语言读取数据空值
- 读取文件中的换行符不等于空
- 将图片保存到系统图库
- 借助软件 KSAN3D,用Kinect 或 xtion 扫描物体实现360完整模型
- 【SSH 基础】浅谈Hibernate映射
- angularjs controller, service, directive 的demo
- MFC模态对话框
- 读取条空比例
- Android ViewConfiguration.getScaledTouchSlop () 用法
- lucene 评分公式 ——forfuture1978
- 【蓝桥杯】【切面条】
- 猫猫学iOS之iOS键盘隐藏,下一个textField,键盘控制第三方好用框架IQKeyboardManager
- 各种加密签名算法MD5/SHA, DES,RSA,DSA,ECC
- Object_C 回顾 0.0.1
- window 下PHP redis扩展插件
- VC总是重新生成问题