题意:略 简单的矩阵快速幂就行了 #include <iostream> #include <cstdio> #include <cstring> using namespace std; #define LL long long #define N 10 int m; struct node{ int mat[N][N]; node operator *(const node &x){ node tmp; memset(tmp.mat,0,sizeof(tmp…
A Simple Math Problem Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4331 Accepted Submission(s): 2603 Problem Description Lele now is thinking about a simple function f(x).If x < 10 f(x) =…
Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + -- + a9 * f(x-10); And ai(0<=i<=9) can only be 0 or 1 . Now, I will give a0 ~ a9 and two positive integers k…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=1757 A Simple Math Problem Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6621 Accepted Submission(s): 4071 Problem Description Lele now is thin…
Description Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10); And ai(0<=i<=9) can only be 0 or 1 . Now, I will give a0 ~ a9 and two positive in…