莫队
来源:互联网 发布:mac dock图标大小 编辑:程序博客网 时间:2024/06/06 03:43
#include<cstdio>#include<iostream>#include<cstring>#include<cmath>#include<algorithm>using namespace std;const int N=1e4+10;int block[N];struct Node { int l,r,id; bool operator<(const Node & th)const { if(block[l]==block[th.l]&&r!=th.r)return r<th.r; return l<th.l; }}node[N];int n,m;void build(){ int sq=(int)sqrt(n*1.0); for(int i=1;i<=n;i++){ block[i]=(i-1)/sq; } sort(node,node+m); int l=1,r=0; for(int i=0;i<m;i++){ for(;r<node[i].r;r++){ ////+ r+1 } for(;r>node[i].r;r--){ ////- r } for(;l<node[i].l;l++){ //// -l } for(;l>node[i].l;l--){ //// + l-1 } }}int main(){ return 0;}
0 0
- 【莫队】
- 莫队
- 莫队
- 莫队
- 莫队
- 莫队
- 莫队bzoj1878
- 作诗--莫队
- 莫队 mex
- bzoj1878 莫队
- 莫队+分块
- hdu 5381 莫队...
- CSU 1515 - Sequence (莫队)
- hdu5589 莫队+字典树
- 清橙A1206 莫队
- CF 617E 莫队
- SPOJ 3267:DQUERY 莫队
- HNOI016 大数 莫队
- 多层循环的跳出(return goto break continue 的用法与区别)
- spring4之搭建restful风格的web服务
- 树链剖分
- 用IBExpert管理firebird
- 机器学习(四):BP神经网络_手写数字识别_Python
- 莫队
- RTMPDump开源工程
- 后缀自动机
- 编程之美--游戏之乐--1.7光影切割问题
- shell中if做比较
- 百度搜索有哪些URL参数呢?
- Netty教程
- 后缀自动机广搜
- 加载中...