码迷,mamicode.com
首页 >  
搜索关键字:sizeof    ( 5917个结果
2.62 判断机器是否进行算数右移
//csapp 2.62 include //算数右移返回1,否则返回0 int int_shifts_are_arithmetic() { //return !~( 1 1); unsigned int w = sizeof(int) (w 1)); } int main(void) { prin ...
分类:其他好文   时间:2020-05-10 21:22:07    阅读次数:61
Codeforces 1105D(Kilani and the Game,双队列bfs)
AC代码: #include<bits/stdc++.h> #define ll long long #define endl '\n' #define mem(a,b) memset(a,b,sizeof(a)) #define IO ios::sync_with_stdio(false);cin ...
分类:其他好文   时间:2020-05-09 21:06:35    阅读次数:60
Linux下网络编程
目录 一、相关协议的介绍 二、socket实现C/S通信 三、常用函数介绍 1、socket() 用于服务端和客户端 2、bind() 用于服务端 涉及到大端和小端模式 3、listen() 用于服务端 4、accetp() 用于服务端 5、connect() 用于客户端 一、相关协议的介绍 二、s ...
分类:系统相关   时间:2020-05-09 16:51:32    阅读次数:101
C++11 STL constexpr关键字
自C++11起,constexpr可用来让表达式核定于编译期,例如 constexpr int square(int x){ return x*x; } float a[square(9)];cout<<"size="<<sizeof(a)/sizeof(a[0])<<endl; ...
分类:编程语言   时间:2020-05-08 23:01:36    阅读次数:61
IDA逆向常用宏定义
/* This file contains definitions used by the Hex-Rays decompiler output. It has type definitions and convenience macros to make the output more reada ...
分类:其他好文   时间:2020-05-08 16:13:24    阅读次数:107
1030 Travel Plan (SPFA)
link int dis[500][500]; int cost[500][500]; int pre[500]; int mindis[500]; int mincost[500]; int inque[500]; int main(){ memset(dis,-1,sizeof(dis)); i ...
分类:其他好文   时间:2020-05-08 09:32:57    阅读次数:49
Codeforces Round #637 (Div. 2)
Codeforces Round 637 (Div. 2) "A. Nastya and Rice" "E. Nastya and Unexpected Guest" 待补 ...
分类:其他好文   时间:2020-05-05 10:34:23    阅读次数:62
cdev_alloc与cdev_init区别
struct cdev *cdev_alloc(void) { struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL); if (p) { INIT_LIST_HEAD(&p->list); kobject_init(&p->kobj, & ...
分类:其他好文   时间:2020-05-05 01:03:40    阅读次数:92
2020西工大校赛 C王国(LCA)
典型的树上求两点间距离最大值,lca的做法 这题要求同一个阵营,不妨先将同属一个阵营的先存进数组,之后每组进行比较 比较时取出深度最深的,因为这个一定是答案中两点中的其中一个答案,这是树的性质,不妨可以想一想 #include<bits/stdc++.h> using namespace std; ...
分类:其他好文   时间:2020-05-04 21:18:03    阅读次数:69
【数据结构】线性表常用操作(C++)
线性表 顺序表示 定义: 相关函数: C语言: malloc(m) 开辟 m 字节长度的地址空间,并返回这段空间的首地址。 sizeof(x) 计算变量 x 的长度。 free(p) 释放指针 p 所指变量的存储空间,即彻底删除一个变量。 C++:new 初始化线性表 参数用引用 参数用指针 销毁线 ...
分类:编程语言   时间:2020-05-04 17:31:31    阅读次数:57
5917条   上一页 1 ... 23 24 25 26 27 ... 592 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!