码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
poj2395 Out of Hay , 求MST的最长边
点击打开链接 求MST的最长边~ prim #include #include #include #include #define Min(a,b) (a)<(b)?(a):(b) using namespace std; const int INF = 1000000000; const int maxn = 2000 + 5; struct pto {...
分类:其他好文   时间:2014-06-11 06:45:17    阅读次数:235
数据结构:树的BFS,树的层次遍历! 按先序遍历创建一棵树,然后以层次遍历输出。
按先序遍历创建一棵树,以层次遍历输出 样例输入 A B # D # # C E # # F # # 样例输出 LevelOrder: A B C D E F     代码: #include #include using namespace std; struct node { //表示一个树上的节点 char ch; nod...
分类:其他好文   时间:2014-06-10 15:58:02    阅读次数:295
【Leedcode】Insertion Sort List
Sort a linked list using insertion sort. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *nex...
分类:其他好文   时间:2014-06-10 12:14:19    阅读次数:253
POJ - 1376 Robot
题意:求在可以一秒沿着既定方向走1到3步和向左或右转90度的情况下,从起点到终点的最短时间 思路:坑的是这机器人还有体积,所以不能走到边界,然后就是单纯的BFS #include #include #include #include #include using namespace std; const int MAXN = 110; struct node { int x,y;...
分类:其他好文   时间:2014-06-10 07:59:51    阅读次数:256
初探swift语言的学习笔记(类对象,函数)
swift 类和函数的学习。...
分类:其他好文   时间:2014-06-10 06:56:33    阅读次数:156
二叉树的存储与遍历
typedef char status;typedef char Telemtype;#define NULL 0#define OK 1typedef struct bitnode{ Telemtype data; struct bitnode *lchild,*rchild;}bitnode.....
分类:其他好文   时间:2014-06-09 21:39:56    阅读次数:209
二叉树链式存储结构
二叉链表的C语言描述基本运算的算法——建立二叉链表、先序遍历二叉树、中序遍历二叉树、后序遍历二叉树、后序遍历求二叉树深度#include#includeusing namespace std;class Tree{private: struct Node { char da...
分类:其他好文   时间:2014-06-09 18:39:49    阅读次数:310
逆序单链表
#include using namespace std;struct Node{ Node *next; int elem;};void creatList(Node* &head){ head = new Node; int elem; cin>>elem; ...
分类:其他好文   时间:2014-06-09 17:50:43    阅读次数:219
不带头结点的单链表递归删除元素为X的结点
#include using namespace std;struct Node{ Node *next; int elem;};void creatList(Node* &head){ head = new Node; int elem; cin>>elem; ...
分类:其他好文   时间:2014-06-09 16:07:55    阅读次数:229
UNIX网络编程-函数原型
#include ssize_t recvfrom(int sockfd, void *buff, size_t nbytes, int flags, struct sockaddr *from, socklen_t *addrlen);ssize_t sendto(int sockfd, cons...
分类:其他好文   时间:2014-06-09 13:22:32    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!