码迷,mamicode.com
首页 >  
搜索关键字:struct sk_buff    ( 19001个结果
Go数据结构之Stack
Stack 一个简单确很有用的数据结构:FILOpackage Stackimport ( "errors" "fmt")const ( defaultLength=100)type Stack struct{ top int size int element [...
分类:其他好文   时间:2014-06-07 05:14:42    阅读次数:211
boost::interprocess::shared_memory_object(1)(基本类型)
#include #include struct pos2d{ int x; int y;};using namespace std;int main(){ //boost::interprocess::shared_memory_object类是按照单个字节的方式读写共享内存,用...
分类:其他好文   时间:2014-06-07 03:57:20    阅读次数:277
类型强转和字节对齐
当一个较少字节对齐类型的指针强转为一个较多字节对齐的指针类型时,这样有些时候会产生问题。 在arm的平台上,这个问题比较明显,在x86平台上运行后没这个问题typdef struct{int addr;int rdda;}Test_t;int main(){short int a;short ...
分类:其他好文   时间:2014-06-07 03:40:59    阅读次数:301
boost::interprocess::managed_shared_memory(2)(std::deque)
struct shareDataEx : shareData{ int index; int total_size;};typedef managed_shared_memory::segment_manager segment_manager_t; //段管理器type...
分类:其他好文   时间:2014-05-30 11:23:53    阅读次数:267
【HDOJ】3127 WHUgirls
1 #include 2 #include 3 4 #define mymax(a, b) (a>b) ? a:b 5 6 typedef struct { 7 int x, y, c; 8 } rect_st; 9 10 rect_st rects[15];11 12 int d...
分类:其他好文   时间:2014-05-30 04:35:16    阅读次数:200
treap模版代码
treap模版暂存。以后修改整理。#include#include#include #includeusing namespace std;struct Node{ Node *ch[2];//左右子树 int r;//优先级。数值越大,优先级越高 int v;//值 int...
分类:其他好文   时间:2014-05-30 01:45:16    阅读次数:250
生化武器2--bfs
1 #include //bfs; 2 #include 3 #include 4 #include 5 using namespace std; 6 struct data 7 { 8 int x,y,t; 9 }now,pos; 10 int n,m,t,dis[...
分类:其他好文   时间:2014-05-30 01:26:49    阅读次数:242
【HDOJ】3466 Proud Merchants
先排序预处理,后01背包。 1 #include 2 #include 3 #include 4 5 #define MAX(a, b) (a>b) ? a:b 6 7 int dp[5000]; 8 9 typedef struct {10 int p, q, v;11 } s...
分类:其他好文   时间:2014-05-29 11:40:04    阅读次数:277
【HDOJ】2851 Lode Runner
开始没理解题意。原来destinations是指路的序号。而不是点。DP。 1 #include 2 #include 3 4 int dp[2005]; 5 6 typedef struct { 7 int s, e, w; 8 } road_st; 9 10 road_st ro...
分类:其他好文   时间:2014-05-29 09:18:50    阅读次数:325
C --gettimeofday===获取某个程序经历的时间
#include #include #include int gettimeofday(struct timeval*tv,struct timezone *tz);int main(int argc, char* argv[]){ int timeuse; struct timeva...
分类:其他好文   时间:2014-05-29 09:00:28    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!