上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页

2014年10月7日

CodeForces 474F 线段树水题:求区间gcd和区间最小值,最小值个数

摘要: 1 #include 2 #include 3 int a[1000005],minv[1000005],num[1000005],gcdv[1000005]; 4 int gcd(int x,int y) 5 { 6 if (y==0) return x; 7 return gc... 阅读全文

posted @ 2014-10-07 18:44 xiao_xin 阅读(293) 评论(0) 推荐(0) 编辑

CodeForces 474E 满足变化范围条件的最长上升序列:线段树加速

摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 long long a[1000005],b[1000005],pre[100005],maxv[1000005],from[100000... 阅读全文

posted @ 2014-10-07 18:42 xiao_xin 阅读(173) 评论(0) 推荐(0) 编辑

CodeForces 474C(点绕点旋转后坐标公式,判断四个点正方形存距离平方比1:2)

摘要: 1 #include 2 #include 3 int i,j,k,f,flag,c[300],s[300],t,x[6],y[6],a[6],b[6],mini,cnt; 4 long long temp; 5 int aa,bb,cc,dd1; 6 long long tempx[10],t... 阅读全文

posted @ 2014-10-07 18:39 xiao_xin 阅读(272) 评论(0) 推荐(0) 编辑

2014年10月2日

hdu5044 树链剖分模板(点+边,区间修改)+(附带输入优化和申请栈)

摘要: 这是常规的使用线段树超时: 1 #pragma comment(linker, "/STACK:16777216") 2 #include 3 #include 4 long long ans[2][100005]; 5 int next[200005],head[100005],poin... 阅读全文

posted @ 2014-10-02 22:05 xiao_xin 阅读(633) 评论(0) 推荐(0) 编辑

2014年10月1日

spoj375 树链剖分模板(边权,点修改求区间最大值)

摘要: 1 #include 2 #include 3 int now,cnt,d[100005][5]; 4 int next[100005],head[100005],point[100005]; 5 int son[100005],father[100005],num[100005],de... 阅读全文

posted @ 2014-10-01 23:41 xiao_xin 阅读(146) 评论(0) 推荐(0) 编辑

fuzhou2082 树链剖分模板(边权,修改点查询区间和)

摘要: 1 #pragma comment(linker, "/STACK:1024000000,1024000000") 2 #include 3 #include 4 int now,cnt,d[50005][5]; 5 int next[100005],head[50005],point[... 阅读全文

posted @ 2014-10-01 22:52 xiao_xin 阅读(144) 评论(0) 推荐(0) 编辑

hdu3966 树链剖分模板(点权,修改区间查询点)

摘要: 1 #pragma comment(linker, "/STACK:1024000000,1024000000") 2 #include 3 #include 4 int now,cnt,n,a[50005]; 5 int next[100005],head[50005],point[1... 阅读全文

posted @ 2014-10-01 15:02 xiao_xin 阅读(172) 评论(0) 推荐(0) 编辑

2014年9月30日

hdu2586 lca模板(tarjan离线算法)

摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct dian{ 7 int v,id; 8 }; 9 int now;10 vectormp[100005];11 int vis[10000... 阅读全文

posted @ 2014-09-30 21:26 xiao_xin 阅读(133) 评论(0) 推荐(0) 编辑

2014年9月26日

hdu5032 点和查询分别按极角排序 离线做+树状数组

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 struct jie{ 6 double k; 7 int x,v; 8 }dian[1000005],xian[100005]; 9 long long c[100... 阅读全文

posted @ 2014-09-26 18:05 xiao_xin 阅读(119) 评论(0) 推荐(0) 编辑

2014年9月25日

hdu5032 关于bitset传递闭包

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 bitsetedge[1005]; 6 int main() 7 { 8 int i,sum,T,t,j,n,x,y; 9 double ans;10 sca... 阅读全文

posted @ 2014-09-25 21:38 xiao_xin 阅读(192) 评论(0) 推荐(0) 编辑

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页

导航