码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
数据结构—串的堆分配
#include #include typedef struct { char *ch; int length; }HString; void StrAssign(HString &T,char *chars); void StrLength(HString S); void StrCompare(HString S,HString T); void ClearString(HString &S...
分类:其他好文   时间:2014-08-01 13:50:01    阅读次数:123
栈的基本操作—出栈与入栈
#include #include #define LENGTH 100 //初始分配栈的长度 #define ADD_LEN 10 //栈长增量 typedef struct {//构造栈的数据类型 int *base; int *top; int stacksize; }SqStack; void CreateStack(SqStack &S);//初始化一个栈 void PushS...
分类:其他好文   时间:2014-08-01 13:49:41    阅读次数:187
poj 2970 优先队列
就多个等于号纠结死 先按di排序,(从小到大)。然后依次完成合同,若发现第i个合同无法在截止日期前完成,便从之前已经完成的任务中选一个aj最大的合同,付钱来使得这个合同尽快完成。 #include #include #include #include #include using namespace std; struct node {     int q;     in...
分类:其他好文   时间:2014-08-01 13:48:41    阅读次数:239
c语言实现tree数据结构
该代码实现了tree的结构,依赖dyArray数据结构。有first一级目录,second二级目录。 dyArray的c实现参考这里点击打开链接  hashTable的c实现参考这里点击打开链接 下面是跨平台的数据类型定义 // // cpPlatform.h // dataStruct // // Created by hherima on 14-7-29. // Copyrigh...
分类:编程语言   时间:2014-08-01 13:46:21    阅读次数:279
一维树状数组
Apple Treehttp://poj.org/problem?id=3321 1 #include 2 #include 3 #define mt(a,b) memset(a,b,sizeof(a)) 4 const int M=100010; 5 struct G{ 6 struct ...
分类:其他好文   时间:2014-08-01 13:18:11    阅读次数:178
hdoj 2602 Bone Collector 【01背包】
题意:给出袋子的体积和骨头的个数,然后又给出每个骨头的价值和体积,求袋子最多能装的骨头的价值 难点;这道题是最基础的01背包题,不懂得话推荐看《背包九讲》 AC by SWS 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2602 代码: #include #include typedef struct{ int w, v; }str;...
分类:其他好文   时间:2014-08-01 10:55:11    阅读次数:215
hdu1598--结题报告
题解:对于输入的边,我们首先按照速度从大到小排序,然后对于每一次询问,st   end 两个城市,我们暴力枚举, for(int i = 0; i 上马: //187MS 300K #include #include using namespace std; #define MAX 205 #define INF 1<<30 int N,M,Q; struct Edge { ...
分类:其他好文   时间:2014-08-01 10:53:31    阅读次数:204
uva208 - Firetruck
Firetruck The Center City fire department collaborates with the transportation department to maintain maps of the city which reflects the current stat...
分类:其他好文   时间:2014-08-01 09:13:31    阅读次数:223
POJ 3348
水题。不过,题意。。呵呵了。。围一个凸包,求出面积,然后除以50就可以了。#include #include #include #include using namespace std;const int MAXN=10500;struct point { int x,y;}p[MAXN];int ...
分类:其他好文   时间:2014-07-31 23:47:30    阅读次数:328
[leetcode]Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLi...
分类:其他好文   时间:2014-07-31 23:25:40    阅读次数:292
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!