码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
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
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
进程间同步(1)——条件变量和互斥量
1. 概述 条件变量和互斥量是最基本的同步形式,总是用于同步同一个进程的各个线程间同步。 当把条件变量或互斥量放在共享内存区时,可用于进程间同步。 同样的情况还有读写锁,它们都是随进程的持续性。 2.互斥锁 互斥锁指代相互排斥,用于保护临界区。多个线程和多个进程分享的共享数据。 静态初始化:stat...
分类:其他好文   时间:2014-08-01 22:49:32    阅读次数:320
【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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!