摘要: [题解] /* WA://50分 last:(r-l+1)<-- (r-mid) (r-l+1)<-- (mid-l+1) now:int mid=l+r>>1; tr[lc].sxy+=tr[lc].sx*addy[k]+tr[lc].sy*addx[k]+(real)(mid-l+1)*addx 阅读全文
posted @ 2017-04-11 21:39 神犇(shenben) 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 输入描述 Input Description 输入输出数据精度为1e-10 [题解] #include<cstdio> using namespace std; const int N=1e3+5; char s[N][N]; long double ec[N],f[N][N]; int va[N] 阅读全文
posted @ 2017-04-11 21:38 神犇(shenben) 阅读(272) 评论(0) 推荐(0) 编辑
摘要: [题解] 官方题解就两句话。 写了三个版本的不同分值代码。看代码吧。 前导1 //f[i][j][1/0]表示长为i,sum mod p=j,是否已经选了质数的方案数 #include<cstdio> using namespace std; const int mod=20170408; cons 阅读全文
posted @ 2017-04-11 21:37 神犇(shenben) 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 分数规划的裸题。 不会分数规划的OIer。百度:胡伯涛《最小割模型在信息学竞赛中的应用》 /* TLE1: last:add(i,j+n,1e9,(real)((real)a[i][j]-ans*(real)b[i][j])); now :add(i,j+n,1,(real)((real)a[i][ 阅读全文
posted @ 2017-04-11 21:37 神犇(shenben) 阅读(181) 评论(0) 推荐(0) 编辑
摘要: [题解]: #include<cstdio> #include<cstring> #include<iostream> using namespace std; const int N=1e5+5; struct edge{int v,next;}e[N<<1];int tot,head[N],cu 阅读全文
posted @ 2017-04-11 21:36 神犇(shenben) 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 输入描述 Input Description [题解] 对于蓝色部分预处理前缀积。 然后在用除法分块搞一下。 O(Q*sqrt(min(n,m))*logn+nlogn) #include<cstdio> #include<iostream> using namespace std; typedef 阅读全文
posted @ 2017-04-11 21:35 神犇(shenben) 阅读(271) 评论(0) 推荐(0) 编辑