Fork me on GitHub
摘要: 原题:ZOJ 3772 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3772 这题算是长见识了,还从没坐过矩阵+线段树的题目呢,不要以为矩阵就一定配合快速幂来解递推式的哦。 由F(x)=F(x-1)+F(x-2)*A[x] 阅读全文
posted @ 2014-07-09 21:19 whatbeg 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 原题:ZOJ 3768http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3768一个结论:一个正整数总能用不超过三个前n项相加表示。先找一个的,在找两个,三个的,二分找,用lower_bound函数。代码:#include #i... 阅读全文
posted @ 2014-07-09 19:02 whatbeg 阅读(210) 评论(0) 推荐(0) 编辑