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) 编辑

导航