摘要: 取$M=\sqrt{300000}$。设$g[i]$表示程序员的$\bmod i$最小的值。若$Yconst int N=300010,M=550;int n=300000,m=n/M,q,i,x,pos[N],st[M],f[N],tag[M],g[M];char op[5];inline voi... 阅读全文
posted @ 2015-10-29 23:48 Claris 阅读(885) 评论(0) 推荐(0)
摘要: 考虑离线操作,求出每个向量存在的时间区间,用时间线段树来进行分治,在每个节点求出凸壳后,询问时在凸壳上三分答案。时间复杂度$O(n\log^2n)$。#include#includetypedef long long ll;const int N=200010,M=4000000;int n,m,i... 阅读全文
posted @ 2015-10-29 01:48 Claris 阅读(794) 评论(1) 推荐(0)