码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
【二分答案】【哈希表】【字符串哈希】bzoj2946 [Poi2000]公共串
二分答案,然后搞出hash值扔到哈希表里。期望复杂度O(n*log(n))。#include#include#includeusing namespace std;typedef unsigned long long ull;const ull seed=29;#define MOD 2007typ...
分类:其他好文   时间:2015-01-23 22:52:15    阅读次数:276
malloc函数具体解释
一、原型:extern void *malloc(unsigned int num_bytes);头文件:#include 或 #include (注意:alloc.h 与 malloc.h 的内容是全然一致的。)功能:分配长度为num_bytes字节的内存块说明:假设分配成功则返回指向被分配内.....
分类:其他好文   时间:2015-01-23 14:40:42    阅读次数:190
51单片机的数码管和矩阵键盘
使用4*4的矩阵键盘和一个数码管 在4*4的矩阵键盘上编码0-F的字符,和一个数码管显示每个键盘上输入的字符。 //4*4键盘检测程序,按下键后相应的代码显示在数码管上 #include typedef unsigned char UINT8; UINT8 i=100; UINT8 j,k,temp,key; void delay(unsigned char i) { for(j=i;j...
分类:其他好文   时间:2015-01-22 18:19:09    阅读次数:170
uint8_t
在做项目时遇到uint8_t,于是上网查资料,找到参考答案:C语言中好像没有这种数据类型,但是在实际应用的过程中,发现许多人的代码中都存在这种表示方式。其实uintX-t就是通过typedef定义的,利用预编译和typedef可提高效率也方便代码移植。总结如下:     typedef unsigned char   uint8_t;     //无符号8位数     typedef si...
分类:其他好文   时间:2015-01-22 18:17:58    阅读次数:143
BZOJ 2258 pku2758 Checking the Text 文本校对 Splay+Hash
题目大意:给定一个字符串,多次插入一个字符和询问某两个后缀的LCP Splay+Hash。同1014 这逗比的询问。。。。。。 #include #include #include #include #define M 50500 #define BASE 151 using namespace std; typedef unsigned long long ll; struct a...
分类:其他好文   时间:2015-01-22 11:08:55    阅读次数:190
MD5和SHA1算法C++实现及运行时间分析
1.MD5代码实现 HMAC.H即MD5头文件。 #ifndef HMAC_H #define HMAC_H // POINTER defines a generic pointer type typedef unsigned char *POINTER; // UINT2 defines a two byte word typedef unsigned short int UINT2...
分类:编程语言   时间:2015-01-22 00:24:41    阅读次数:255
sql编写注意
DROP TABLE IF EXISTS `imooc_pro`;CREATE TABLE `imooc_pro`(`id` int unsigned auto_increment key,`pName` varchar(50) not null,`pNum` int unsigned defaul...
分类:数据库   时间:2015-01-21 19:40:41    阅读次数:275
51的8*8点阵显示数字
51的代码 #include #include #define int8 unsigned char #define int16 unsigned int #define int32 unsigned long int8 code num_tab[10][8]={ {0xFF,0xFF,0xC1,0xBE,0xBE,0xC1,0xFF,0xFF},/*"0",0*/ {0xFF,0x...
分类:其他好文   时间:2015-01-21 13:29:05    阅读次数:146
第十章:对象和类
10.2题定义一个类来表示银行账户 1 #include 2 using namespace std; 3 class BankAccount 4 { 5 string m_name; 6 string m_num; 7 unsigned int m_balance; 8 ...
分类:其他好文   时间:2015-01-20 23:29:36    阅读次数:218
char ,int ,long,double等数据类型的范围
运行结果 以上结果已经很明白了,一下补充说明几点: 概念、整型:表示整数、字符和布尔值的算术类型合称为整型(integral type)。 关于带符号与无符号类型:整型 int、stort  和  long 都默认为带符号型。要获得无符号型则必须制定该类型为unsigned,比如unsigned long。unsigned int类型可以简写为unsigned,也就是...
分类:其他好文   时间:2015-01-20 22:15:22    阅读次数:259
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!