码迷,mamicode.com
首页 >  
搜索关键字:define    ( 25272个结果
【HDOJ】1892 See you~
wa了十次,原来变量名写错。二维树状数组。 1 #include 2 #include 3 4 #define MAXN 1002 5 6 int nums[MAXN][MAXN]; 7 8 void swap(int *x, int *y) { 9 int tmp;10 ...
分类:其他好文   时间:2014-06-16 08:34:51    阅读次数:216
SRM 587 DIV1
550结论:同一层的交点共线。很容易猜到,也可以跑几组数据验证。利用结论就可以按层算,再利用对称性简化计算。 1 using namespace std; 2 #define maxn 70100 3 class TriangleXor { 4 public: 5 int theArea(i...
分类:其他好文   时间:2014-06-16 07:18:41    阅读次数:184
C socket demo
一、服务端-server.c#include #include #include #include #include #include #include #define MAXPENDING 5#define BUFFSIZE 32void Die(char *mess){ perror(me...
分类:其他好文   时间:2014-06-16 07:15:50    阅读次数:182
cocos2d-x 利用CCLabelTTF制作文字描边与阴影效果的实现方法
//// myttf.h//// Created by 王天宇 on 14-6-12.////#ifndef ____SLG__myttf__#define ____SLG__myttf__#include #include "cocos2d.h"USING_NS_CC;using namesp.....
分类:其他好文   时间:2014-06-16 00:58:52    阅读次数:253
BZOJ1588 营业额统计 splay tree
最基本的平衡树操作吧,第一次学splay的可以做一下只需要插入,删除,旋转,求前驱,后继这5个操作吧不喜欢用指针,用数组写的//HNOI2002营业额统计 #include#include#include#include#define INF 1key[root]],root,k); Spla...
分类:其他好文   时间:2014-06-13 20:10:15    阅读次数:282
Design Pattern Singleton 单一模式
单一模式的几个注意点:一) 设计单一模式,首先须要把构造函数给私有化了,不让外界訪问,那么外界仅仅能通过提供的函数获取一个新的类。二) C++的单一模式,记得要在类外初始化一个类,否则或内存出错的。三) 这个唯一的类必须是要静态的程序:#ifndef _SINGLETON_H#define _SIN...
分类:其他好文   时间:2014-06-13 17:36:18    阅读次数:249
java 基础数据结构
数据结构, 需要考虑两个方面:1. 每个元素具体的存储方法 (java中是一个对象)2. 元素之间的关系如何实现存储 (java中也是一个对象)另外在java中, 已经可以把跟数据结构有关的一些方法写到一个类里了.线性表顺序表c语言: 借助数组实现#define INIT_SIZE 100;type...
分类:编程语言   时间:2014-06-13 16:19:21    阅读次数:282
poj1019
给定数列:1121231234...求:某一位对应的数值打表+二分******************************#include#include#include#define MAXN 111111#define P 31268#define N 2147483647using nam...
分类:其他好文   时间:2014-06-13 15:32:12    阅读次数:223
【HDOJ】1930 And Now, a Remainder from Our Sponsor
简单字符串。 1 #include 2 3 #define MAXLEN 160 4 5 char buf[MAXLEN]; 6 int keys[4], parts[4]; 7 8 void getpart(int x) { 9 int i;10 for (i=3; i>=...
分类:其他好文   时间:2014-06-13 15:10:31    阅读次数:242
BUFSIZ解析
BUFSIZ解析: 包含在#include中,BUFSIZ[=8192]。stdio.h:#ifndef BUFSIZstdio.h:#define BUFSIZ _IO_BUFSIZlibio.h:#define _IO_BUFSIZ _G_BUFSIZ_G_config.h:#define _....
分类:其他好文   时间:2014-06-12 06:32:42    阅读次数:484
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!