码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
LeetCode "Combination Sum II"
The only difference with version I is: one number can only be used once:class Solution {public: vector > ret; struct Rec { Rec() : sum...
分类:其他好文   时间:2014-07-31 05:22:25    阅读次数:239
UVa10815_Andy's First Dictionary(小白书字符串专题)
解题报告 思路: 字典树应用,dfs回溯遍历字典树 #include #include #include using namespace std; struct node { int v; node *next[26]; }; int l,m,cnt; char str[100],ch[100],dic[5500][100]; node *newnode() { ...
分类:其他好文   时间:2014-07-31 00:05:35    阅读次数:283
CII-原子
#ifndef ATOM_INCLUDED #define ATOM_INCLUDED extern int Atom_length(const char *str); extern const char *Atom_new(const char *str, int len); extern const char *Atom_string(const char *str); extern con...
分类:其他好文   时间:2014-07-31 00:04:09    阅读次数:289
浅谈linux内核栈(基于3.16-rc4)
在3.16-rc4内核源码中,内核给每个进程分配的内核栈大小为8KB。这个内核栈被称为异常栈,在进程的内核空间运行时或者执行异常处理程序时,使用的都是异常栈,看下异常栈的代码(include/linux/sched.h):1 union thread_union {2 struct thre...
分类:系统相关   时间:2014-07-30 23:31:05    阅读次数:411
linux timing
double getUnixTime(void){ struct timespec tv; if(clock_gettime(CLOCK_REALTIME, &tv) != 0) return 0; return (((double) tv.tv_sec) + (double) (...
分类:系统相关   时间:2014-07-30 23:25:05    阅读次数:228
单链表练习
//code:#include#includeusing namespace std;typedef int status;typedef int elemType;typedef struct lNode{elemType num;struct lNode *next;}lNode,*linkNo...
分类:其他好文   时间:2014-07-30 23:13:45    阅读次数:189
将两个有序链表和为另外一个链表,并保证有序
直接递归 代码: #include #include using namespace std; typedef struct listNode{ int key; struct listNode *pNext; } * pNode,Node; void createNode(pNode &pHead){ bool isFirst=true; int temp; sc...
分类:其他好文   时间:2014-07-30 20:57:14    阅读次数:174
循环双链表的简单实现
//代码为自己编写,可能有问题,欢迎大家留言指正! #include #include using namespace std; typedef struct dnode { int val; dnode *prior; dnode *next; }dnode; dnode * create(); void traverse(dnode *pHead); bool insert(dn...
分类:其他好文   时间:2014-07-30 20:56:44    阅读次数:210
CII-2.4指针常量和常量指针
#define T Stack_T typedef struct T *T; struct T { int count; struct elem { void *x; struct elem *link; } *head; } const T stk //指针常量, const修饰struct T *。地址不能变。 const struct T *stk //指向常量的指...
分类:其他好文   时间:2014-07-30 20:56:14    阅读次数:187
三维凸包模版 求三维凸包的表面积和体积
#include #include #include #include #include #include #include using namespace std; #define PR 1e-8 #define N 510 struct TPoint{ double x, y, z; TPoint(){} ...
分类:其他好文   时间:2014-07-30 20:55:34    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!