博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
后缀数组da3模板
阅读量:7174 次
发布时间:2019-06-29

本文共 1037 字,大约阅读时间需要 3 分钟。

在做poj2406的时候。。。按论文给的rmq模板会超内存。。。然后网上找了http://blog.csdn.net/libin56842/article/details/46310425这位大爷的da3rmq就过了= =

1 #include 
2 #include
3 #include
4 #include
5 #include
6 #include
7 #include
8 #include
9 #include
10 #include
11 #include
12 #include
13 using namespace std; 14 15 #define LS 2*i 16 #define RS 2*i+1 17 #define UP(i,x,y) for(i=x;i<=y;i++) 18 #define DOWN(i,x,y) for(i=x;i>=y;i--) 19 #define MEM(a,x) memset(a,x,sizeof(a)) 20 #define W(a) while(a) 21 #define gcd(a,b) __gcd(a,b) 22 #define LL long long 23 #define N 1000005 24 #define MOD 1000000007 25 #define INF 0x3f3f3f3f 26 #define EXP 1e-8 27 28 #define F(x) ((x)/3+((x)%3==1?0:tb)) 29 #define G(x) ((x)
=0; i--) b[--wsf[wv[i]]]=a[i]; 53 return; 54 } 55 void dc3(int *r,int *sa,int n,int m) 56 { 57 int i,j,*rn=r+n,*san=sa+n,ta=0,tb=(n+1)/3,tbc=0,p; 58 r[n]=r[n+1]=0; 59 for(i=0; i

 

转载于:https://www.cnblogs.com/julyc/p/5746265.html

你可能感兴趣的文章
第3章 初探HTML
查看>>
基于S/MIME V2标准的加密和解密的控件software IP*Works! S/MIME
查看>>
mysql 备份数据库脚本
查看>>
Linux文件系统上的特殊权限
查看>>
IBM携手红帽将助力企业加快虚拟化步伐
查看>>
8.C++引用
查看>>
利用imgateaselect插件实现前端页面图片截取功能
查看>>
Java super()
查看>>
xinetd服务介绍及配置
查看>>
在Redis-Sentinel的client-reconfig-script脚本中设置VIP
查看>>
服务器资源使用情况统计--脚本
查看>>
Oracle查询数据库的索引字段以及查询用索引
查看>>
第二讲、实例变量可见度、方法
查看>>
zabbix监控基础知识
查看>>
mysql四:数据操作
查看>>
Div的定位
查看>>
Activity ca.ct.activity.OBaccaratActivity has leak
查看>>
nginx+tomcat+resin+jdk一键自动化安装脚本(1--父shell安装脚本)
查看>>
strspn
查看>>
Rancher如何对接Ceph-RBD块存储
查看>>