码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
FFT模板
#include #include #include using namespace std; const double pi = acos(-1.0);const int maxn = 500005; struct complex{ double r,i; complex(double r = 0...
分类:其他好文   时间:2014-08-21 21:03:39    阅读次数:341
链表插入排序、链表归并排序
1.链表1.1链表的存储表示//链表的存储表示typedef int ElemType;typedef struct LNode{ ElemType data; struct LNode *next;}LNode, *LinkList;1.2基本操作创建链表:/* * 创建链表。 * 形参num为链...
分类:其他好文   时间:2014-08-21 21:01:14    阅读次数:221
switch - case 语句
switch语句一般可以用if重写,但是if语句不一定能用switch重写 public enum StausType { /// /// 友情链接 /// linkInfo = 1 ...
分类:其他好文   时间:2014-08-21 19:05:34    阅读次数:323
《数据结构与算法分析》学习笔记(五)——队ADT
一、队的概念 队列也是一种表,但是是一种受限的表,只允许从一端插入,另一端山粗的表。 二、队列的数组实现 #define QMAXSIZE 100typedef int Position;typedef int QElement;typedef struct queue{ QElement Els[...
分类:其他好文   时间:2014-08-21 18:53:24    阅读次数:186
SGU 119 Beautiful People
#include #include #include using namespace std; #define maxx 100050 struct node { int a,b,id; }g[maxx]; int root[maxx]; int id[maxx]; int len; void output(int x) { if(x==-1)return; outp...
分类:其他好文   时间:2014-08-21 17:12:34    阅读次数:174
GO的MAP字典简单用法示例
package mainimport "fmt"type PersonInfo struct { ID string Name string Address string}func main() { var personDB map[string]Person...
分类:其他好文   时间:2014-08-21 14:51:34    阅读次数:195
C# Enum转换
public class Enum2 { public Dictionary GetEnumItems() { Dictionary dicResult = new Dictionary(); T obj ...
分类:其他好文   时间:2014-08-21 14:46:04    阅读次数:164
【ThinkingInC++】31、嵌套友元
/** * 功能:嵌套友元 * 时间:2014年8月21日07:21:29 * 作者:cutter_point */ #include #include //为了初始化时使用memset() #include using namespace std; const int sz=20; struct Holder { private: int a[sz]; //一个整形...
分类:编程语言   时间:2014-08-21 09:53:23    阅读次数:238
bash的RANDOM变量生成的是真正的随机数吗
static voidseedrand (){ struct timeval tv; gettimeofday (&tv, NULL); sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ());}上述是bash中生成随机数的代码,处理是非常的简单,秒 (tv.tv_s...
分类:其他好文   时间:2014-08-20 22:34:52    阅读次数:206
怪物AI(复习)
怪物AI执行//-----------------------------------------------主动攻击------------------------------------------------------初始状态attack_style Enum攻击方式 ...
分类:其他好文   时间:2014-08-20 22:21:22    阅读次数:275
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!