码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
poj 1021
图同构。一个神奇的算法居然0ms过。真是不科学。反例可以构造出来。还是没有针对他的数据。#include #include #include #include using namespace std;struct position{ int x,y; }pos[10010];in...
分类:其他好文   时间:2014-07-22 22:55:55    阅读次数:147
hiho 第二周
Trie树,第一次写,简单的建树+搜索它的思路hiho上讲得很清楚,good~ 1 #include 2 #include 3 using namespace std; 4 char word[11]; 5 int n,m; 6 struct trie 7 { 8 int num; 9 ...
分类:其他好文   时间:2014-07-19 21:17:39    阅读次数:205
Poj 1556 The Doors 计算几何+最短路
其实本题非常的无脑,无脑拍完1A,写到blog里只因为TM无脑拍也拍了很久啊= =#include #include #include #include #include #include #include #include #include #include #include #include #...
分类:其他好文   时间:2014-07-19 21:14:05    阅读次数:186
链表操作
1链表逆序http://blog.csdn.net/niuer09/article/details/5961004typedef struct tagListNode{ int data; struct tagListNode* next;}ListNode, *List;List Re...
分类:其他好文   时间:2014-07-19 20:28:12    阅读次数:188
FZU 2150 Fire Game --两点同步搜索
枚举两点,然后同步BFS,看代码吧,很容易懂的。代码:#include #include #include #include #include #include #include #define Mod 1000000007using namespace std;struct Point{ i...
分类:其他好文   时间:2014-07-19 20:21:38    阅读次数:245
C语言结构体的初始化
今天在工作时,看到了奇葩的结构体初始化方式,于是我查了一下C99标准文档和gcc的说明文档,终于搞清楚是怎么回事了。 假设有如下结构体定义:typedef struct{ int a, b, c;} MyStruct; 那么结构体的初始化方式如下有三种:(1) C89的初始化方式MyS...
分类:编程语言   时间:2014-07-19 20:09:36    阅读次数:203
好久没更新了,哪里不对!更新二叉树的非递归遍历
#include #include using namespace std;typedef struct Node{ Node* lchild; Node* rchild; int data;}BNode,BTree;void visit(Node*);void inorder(B...
分类:其他好文   时间:2014-07-19 19:26:40    阅读次数:226
4.1 对每个命令行参数打印文件类型
file/filetype.c #include "apue.h"intmain(int argc, char *argv[]){ int i; struct stat buf; char *ptr; for (i = 1; i < argc; i++) { printf("%s: ", argv[...
分类:其他好文   时间:2014-07-18 23:38:27    阅读次数:412
c++包含头文件好还是重新定义好
A.hstruct A{ int a; int b;}; B.cpp在B.cpp里面用到这个结构体有两种方法1.自己定义一个一模一样的结构体struct A{};2.包含A.h头文件 第一种感觉有点蛋疼同样的结构体定义两次,是不是重复了第二种包含别人的头文件,会带来编译的小麻烦,而且这样...
分类:编程语言   时间:2014-07-18 23:23:26    阅读次数:263
【linux c learn 之stat】获取文件的属性
NAME        stat 获取文件属性 这个函数位于头文件中 函数原型: int stat(const char *path, struct stat *buf); 参数: path  文件路径+文件名 buf     指向buffer的指针 返回值: -1   遇到错误 0    成功返回 函数作用: 把path文件的信息复制到指针buf所指的结构体中。...
分类:系统相关   时间:2014-07-18 21:36:18    阅读次数:263
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!