上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页
摘要: http://codeforces.com/contest/675/problem/E 题目大意:有n个车站,每个车站只能买一张票,这张票能从i+1到a[i]。定义p[i][j]为从i到j所需要买的最小票数。问sigma(p)的和是多少。 思路:感觉我的dp定义能力还是太弱了啊,我刚开始还定义成dp 阅读全文
posted @ 2016-09-30 16:18 知る奇迹に 阅读(155) 评论(0) 推荐(0)
摘要: http://codeforces.com/contest/719/problem/E 题目大意:给你一串数组a,a[i]表示第i个斐波那契数列,有如下操作 ①对[l,r]区间+一个val ②求出[l,r]区间的和。 定义区间的和为该区间内每个a[i]所对应的斐波那契数列的和。 思路:线段树保存区间 阅读全文
posted @ 2016-09-30 11:55 知る奇迹に 阅读(162) 评论(0) 推荐(0)
摘要: struct mat{ LL a,b; mat(LL A=0,LL B=0):a(A),b(B){} bool isIdentity()const{ return a==1 && b==0; } mat operator+(const mat &rhs)const{ return mat( (a+r 阅读全文
posted @ 2016-09-29 21:10 知る奇迹に 阅读(137) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/qq_21110267/article/details/43540483 阅读全文
posted @ 2016-09-28 11:24 知る奇迹に 阅读(625) 评论(0) 推荐(0)
摘要: http://codeforces.com/contest/716/problem/D 题目大意:给你一些边,有权值,权值为0的表示目前该边不存在,但是可以把0修改成另外一个权值。现在,我们重新建路,问让s-t的最短路能否刚好是L? 思路:暴力修改即可。。。 //看看会不会爆int!数组会不会少了一 阅读全文
posted @ 2016-09-27 22:47 知る奇迹に 阅读(221) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2016-09-27 22:38 知る奇迹に 阅读(1) 评论(0) 推荐(0)
摘要: http://codeforces.com/contest/716/problem/C 题目大意:感觉这道题还是好懂得吧。 思路:不断的通过列式子的出来了。首先我们定义level=i, uplevel = i + 1,目前的uplevel,然后我们可以知道,之前求出来的restgrade%level 阅读全文
posted @ 2016-09-26 16:31 知る奇迹に 阅读(150) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2016-09-25 11:35 知る奇迹に 阅读(7) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2016-09-23 13:40 知る奇迹に 阅读(0) 评论(0) 推荐(0)
摘要: struct KM{ bool S[maxn], T[maxn]; int Lx[maxn], Ly[maxn]; int W[maxn][maxn]; int slack[maxn]; int myleft[maxn]; vector G[maxn]; int n; void init(int n){ this ... 阅读全文
posted @ 2016-09-23 13:39 知る奇迹に 阅读(133) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页