码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
C专家编程之编译器日期被破坏程序
#include #include #include #include #define CHOICE 2 #define FILEPATH "/root/date.c" char global_buffer[120]; //NO.1 使用全局声明的数组 #if CHOICE == 1 char *local_time(char* filename) { struct tm ...
分类:其他好文   时间:2014-08-02 12:48:53    阅读次数:220
Binary Tree Inorder Traversal
问题:二叉树中序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) :...
分类:其他好文   时间:2014-08-02 12:40:33    阅读次数:162
linux内核数据结构学习总结(undone)
linux kernel/user mode data struct learning
分类:系统相关   时间:2014-08-02 12:33:23    阅读次数:564
HDU2647 Reward 【拓扑排序】
#include #include #define maxn 10002 int ans, queue[maxn]; struct Node{ int to, next, val; } map[maxn << 1]; struct node{ int first, money, indegree; } head[maxn]; bool topoSort(int n) {...
分类:其他好文   时间:2014-08-02 10:07:43    阅读次数:196
[算法浅析] 如何在O(1)的时间里删除单链表的结点
题目是这样的:给你一个单链表的表头,再给你其中某个结点的指针,要你删除这个结点,条件是你的程序必须在O(1)的时间内完成删除。 由于有的同学对链表还不是很熟悉,本文尽量描述的通俗易懂,老鸟请直接跳过前面一大段。 链表结构如下: struct node { int val; node* next; }; 题目不是很难,很快就能想到好办法:) 首先回顾一下普通的删除方法,...
分类:其他好文   时间:2014-08-02 05:14:14    阅读次数:231
LeetCode "Sort List"
First I implemented it by QuickSort, but got a TLE:class Solution {public: struct Pair { Pair(ListNode *pS, ListNode *pE) : pStart(pS), p...
分类:其他好文   时间:2014-08-02 05:04:32    阅读次数:233
0722-----C++Primer听课笔记----------虚函数和模板
1.虚指针和虚函数表 1.1不含有任何数据成员或者虚函数的class或者struct大小为1,含有虚函数的对象在基地址部分有一个vptr,指向虚函数表,因此大小为4个字节。 1.2动态绑定的原理:假设派生类和基类存在覆盖的关系(基类中定义了虚函数),那么派生类在虚函数表中,会覆盖掉基类相应的虚函.....
分类:编程语言   时间:2014-08-02 01:47:42    阅读次数:356
zju 1188 DNA Sorting
#include#include#includeusing namespace std;struct node{ int a; char s[105]; }p[105];int cmp(node c,node b){ return c.a #include #inclu...
分类:其他好文   时间:2014-08-02 01:42:32    阅读次数:246
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!