码迷,mamicode.com
首页 >  
搜索关键字:struct    ( 18973个结果
poj 1007 DNA Sorting
错误#include#include#includeusing namespace std;struct node { int a; char s[1000]; }p[1000];int cmp(node c,node b){ return c.ap[k].s[j]) p[k].a++; ...
分类:其他好文   时间:2014-08-02 01:37:12    阅读次数:212
ZOJ 1450
最小圆覆盖#include #include #include #include using namespace std;const double eps=0.00000001;struct point { double x,y;}p[110];struct circle{ point cent; ...
分类:其他好文   时间:2014-08-02 01:30:52    阅读次数:230
Linux内核------进程的基本知识
进程: 传统上,Linux操作系统下运行的应用程序,服务器和其他程序都称为进程。当然进程不仅仅表示一段处于执行期的可执行代码,还包括其他资源,例如打开的文件,挂起的信号和内核内部数据等。其实还有个概念叫,线程或者说轻量级进程,不过在Linux中线程和进程其实是类似的。可以把线程看做和其他进程共享某些数据和资源的进程。 进程的表示: 通常进程是由一个叫task_struct的结构表示的,或者叫...
分类:系统相关   时间:2014-08-01 23:15:23    阅读次数:442
poj 1459 Power Network, 最大流,多源多汇
点击打开链接  多源多汇最大流,虚拟一个源点s'和一个汇点t',原来的源点、汇点向它们连边。 #include #include #include #include #include #include using namespace std; const int maxn = 500 + 5; const int INF = 100000000; struct Ed...
分类:Web程序   时间:2014-08-01 23:13:32    阅读次数:312
字典树(模型体)
给出n(1#include #include #include #include const int N = 20010;using namespace std;struct node{ int flag; node *next[26];};int n,m,ans = 0;struct node *...
分类:其他好文   时间:2014-08-01 22:51:52    阅读次数:220
【LeetCode】Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. /** * Definition for binary tree * struct TreeNode {...
分类:其他好文   时间:2014-08-01 19:53:32    阅读次数:222
从上到下遍历二叉树
思路: 即二叉树的层序遍历。可以使用一个辅助队列,首先将二叉树的根节点入队,然后打印根结点的值,接着判断根结点 是否有左右孩子,如果有,将左右孩子入队。如此循环直到队列为空。 代码: /* 从上到下遍历二叉树 by Rowandjj 2014/8/1 */ #include using namespace std; typedef struct _BNODE_ { i...
分类:其他好文   时间:2014-08-01 19:40:02    阅读次数:245
C++程序设计之结构体,共用体,枚举和typedef
【1】结构体的基本功 注意结构体里面可以有很多东西,可以结构体里面包含结构体#includeusing namespace std;struct Date{ int month; int day; int year;};struct Student{ ...
分类:编程语言   时间:2014-08-01 19:24:32    阅读次数:250
swift 属性
属性将值和类,结构,枚举相关联。属性分为计算属性和存储属性。存储属性存储常量或变量作为实例的一部分 ,计算属性计算一个值。存储属性用于类和结构体,计算属性用于类,结构体和枚举。1:存储属性存储属性是存储类或结构体的实例里的一个常量或变量。struct Range{ var length:Int...
分类:其他好文   时间:2014-08-01 19:21:02    阅读次数:148
c++ THUNK技术
这里想说的是:代码中的关键点为用指令jmp pFunc跳转到你想要执行的函数pFunc。 指令“jmp xxxx”占5个字节,代码中用了个一字节对齐的结构体struct Thunk , 当然也可以用 unsigned char code[5]; 说另一个关键点就是地址计算了,jmp xxxx指令用了相对跳转地址, 相对地址 = 要跳转函数的地址 - “jmp xxxx”指令的下一...
分类:编程语言   时间:2014-08-01 16:17:21    阅读次数:282
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!