DescriptionWithout expecting, Angel replied quickly.She says: "I'v heard that you'r a very clever boy. So if you wanna me be your GF, you should solve...
分类:
其他好文 时间:
2014-10-04 21:53:07
阅读次数:
220
题目地址:HDU 1588
用于构造斐波那契的矩阵为
1,1
1,0
设这个矩阵为A。
sum=f(b)+f(k+b)+f(2*k+b)+f(3*k+b)+........+f((n-1)*k+b)
sum=A^b+A^(k+b)+A^(2*k+b)+A^(3*k+b)+........+A^((n-1)*k+b)
sum=A^b+A^b*(A^k+A^2*k+A^3*k+........
分类:
其他好文 时间:
2014-09-18 18:56:14
阅读次数:
169
Abstract. Numerical integration is the approximate computation of an integral using numerical techniques. The numerical computation of an integral is ...
分类:
其他好文 时间:
2014-09-11 22:19:42
阅读次数:
362
题目链接
题意:g(x) = k * x + b。f(x) 为Fibonacci数列。求f(g(x)),从x = 1到n的数字之和sum,并对m取模。
思路:
设A = |(1, 1),(1, 0)|
sum = f(b) + f(k + b) + f(2k + b)...+f((n-1)k + b) (f(x) 为Fibonacci数列)
sum = A^...
分类:
其他好文 时间:
2014-09-03 22:49:07
阅读次数:
314
Description
In the late 1700s', Gauss, a famous mathematician, found a special kind of numbers. These integers are all in the form:
a + b .The sum and multiplication ofthese integers can be natura...
分类:
其他好文 时间:
2014-08-26 11:46:25
阅读次数:
237
根据题意可构造出方程组,方程组的每个方程格式均为:C1*x1 + C2*x2 + ...... + C9*x9 = sum + 4*ki;
高斯消元构造上三角矩阵,以最后一个一行为例:
C*x9 = sum + 4*k,exgcd求出符合范围的x9,其他方程在代入已知的变量后格式亦如此。
第一发Gauss,蛮激动的。
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-08-09 13:31:36
阅读次数:
273
HDU 1588 Gauss Fibonacci(矩阵快速幂+二分等比序列求和)
ACM
题目地址:HDU 1588 Gauss Fibonacci
题意:
g(i)=k*i+b;i为变量。
给出k,b,n,M,问( f(g(0)) + f(g(1)) + ... + f(g(n)) ) % M的值。
分析:
把斐波那契的矩阵带进去,会发现这个是个等比序列。
...
分类:
其他好文 时间:
2014-08-05 03:05:48
阅读次数:
229
高斯模糊函数的升级版本,带剪裁区域。
函数check_rect()是处理剪裁区域矩形。如果不打算剪裁,只需要设置left, top, right, bottom都为0就可以了;另外位图的存储格式是上下反转的,如果正常剪裁的话,只需要设置bottom为 -bottom即可。...
分类:
其他好文 时间:
2014-08-01 16:10:51
阅读次数:
310
int gauss_blur(
byte_t* image,
//位图数据
int linebytes,
//位图行字节数,BMP数据在windows中是4字节对齐的。否则在处理非二次幂的图像时会有偏差
int width,
//位图宽度
int height,
//位图高度
int cbyte,
//颜色通道数量
float sigma
//高斯系数
)
{...
分类:
其他好文 时间:
2014-08-01 04:55:01
阅读次数:
412