HDU 3065,模板(备忘录)#include#include#include#include#includeusing namespace std;#define M 2222222char sx[1111][128];int n;char s[M];struct Trie{ ...
分类:
其他好文 时间:
2014-07-08 22:48:34
阅读次数:
192
大白书上的393页。
一直在原数组上乱搞。其实要用另外一个数组记录块。
原数组是不能变的。
注意好原数组和块数组的关系,细心一点处理边界。还是不难的。
#include
#include
#include
#include
#define maxn 300005
#define SIZE 600
using namespace std;
int a[maxn];
...
分类:
其他好文 时间:
2014-07-08 21:28:22
阅读次数:
202
Ruby has its own style to define the abstract methods in its class....
分类:
其他好文 时间:
2014-07-08 19:45:49
阅读次数:
145
题目链接:点击打开链接
水。。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll long long
#define L(x) (x<<1)
#define R(x) (x<<1|1)
#define N 100005
i...
分类:
其他好文 时间:
2014-07-08 18:23:14
阅读次数:
164
区间颜色不一致就更新到底,否则lazy标记
#include
#include
#include
#include
using namespace std;
#define lc l,m,index<<1
#define rc m+1,r,index<<1|1
#define N 100005
#define ll __int64
struct node
{
bool same;
ll c...
分类:
其他好文 时间:
2014-07-08 18:00:56
阅读次数:
226
1.先序遍历非递归算法
#define maxsize 100
typedef struct {
Bitree Elem[maxsize];
int top;
} SqStack;
void PreOrderUnrec(Bitree t) {
SqStack s;
StackInit(s);
p=t;
while (p!=...
分类:
其他好文 时间:
2014-07-08 17:13:18
阅读次数:
267
A:选取两点一边就可以了,很明显可以想出来。。。
但是一开始看错题了,sad、、、、
#include
#include
#include
#include
#include
#include
using namespace std;
#define eps 1e-6
#define zero(x) ((fabs(x)<eps?0:x))
#define maxn 550
int val[ma...
分类:
其他好文 时间:
2014-07-08 15:55:50
阅读次数:
212
;; Building Abstractions With Procedures
( define ( my-sqrt x )
( define ( good-enough? guess )
(
( define ( improve guess )
( average guess ( / x guess ) ) )
...
分类:
其他好文 时间:
2014-07-08 15:22:37
阅读次数:
306
Interesting enough to find out the Reader function in Safari is actually Javascript and there are many interesting stuff from the 2000 line code:
* 5 main parts in the file:
* 1. define const
* 2...
分类:
其他好文 时间:
2014-07-08 13:11:46
阅读次数:
469
网络变成首先要注意IP和端口的转换,现在电脑基本上是主机字节序,存储按照小端方式,而在网络中传输统一使用大端方式,所以网络变成首先要注意字节序的转换。
一个常用的ip转换程序的实现:#include
#include
#include
#include
#define CHIP(ip) (ip&0xff)<<24 |(ip&(0xff<<8))<8...
分类:
编程语言 时间:
2014-07-08 13:04:14
阅读次数:
374