
acm-分治
maverick1990
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 3233 Matrix Power Series
分类:分治 难度:1.5 题意:给定矩阵a,求s=a^1+…+a^k,结果mod m。矩阵乘法,两次分治,计算a^k和a^1+…+a^k。即a^k=(a*a)^(k/2), a^1+...+a^k=a^1+...a^(k/2) + a^(k/2) * [ a^1+...a^(k/2) ]。 #include #include int n,k,m; const int N = 3原创 2013-04-10 19:01:50 · 773 阅读 · 0 评论 -
leetcode-Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width o原创 2014-07-09 00:21:58 · 830 阅读 · 0 评论