码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
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
Go数据结构之Queue
Queue 简单而实用的数据结构,FIFO,通过循环数组避免队列出现“似乎满了”的现象。package Queueimport "errors"const ( defaultQueueSize=10)var queueSize inttype MyQueue struct{ front...
分类:其他好文   时间:2014-05-30 00:48:43    阅读次数:284
剑指OFFER之链表中倒数第k个节点(九度OJ1517)
题目描述:输入一个链表,输出该链表中倒数第k个结点。(hint: 请务必使用链表。)输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为两个整数n和k(0#include typedef struct node{ int number; struct nod...
分类:其他好文   时间:2014-05-30 00:29:13    阅读次数:325
单例模式
之前在深入PHP的书中有看过,不过不太理解,打了代码,有种模模糊糊的概念。后来去参加笔试,竟然遇到要写单例模式,后悔TM自己没好好努力学习,结果写不出来,而且也完全不懂单例是啥玩意。现在重新看了资料,来回顾下吧。吖的,看了网上一些资料,有些太TM费解了。特点:他先将初始化函数变为私有,防止外部new...
分类:其他好文   时间:2014-05-29 20:49:46    阅读次数:277
【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
迷上了代码!