Sol:就是求第N项的斐波那契数。矩阵乘法+快速幂
#include
#include
#include
#include
using namespace std;
#define LL long long
struct Mat{
LL f[2][2];
};
LL MOD = 10000;
Mat mul(Mat a,Mat b)
{
LL i,j,k...
分类:
其他好文 时间:
2014-05-22 10:46:35
阅读次数:
191
1. 方程 考虑 $\bbR^3$ 中有界区域 $\Omega$ 上如下的稳态流动:
$$\bee\label{eq} \left\{\ba{ll} \Div(\varrho\bbu)=0,\\ \Div(\varrho\bbu\otimes
\bbu) -\mu\lap \bbu -(\lambd...
分类:
其他好文 时间:
2014-05-22 08:31:41
阅读次数:
364
题目链接:poj 2411 Mondriaan's Dream
题目大意:用1?2的木块填满n?m的矩阵有多少种方法。
解题思路:插头dp裸题。uva11270
#include
#include
typedef long long ll;
const int N = 13;
int n, m;
ll set, dp[N+5][(15];
void solve (int d,...
分类:
其他好文 时间:
2014-05-22 08:06:07
阅读次数:
177
题目链接:uva 11645 - Bits
题目大意:给出n,问从0到n这n+1个数种,数的二进制情况下,有多少11存在。
解题思路:和uva 11038一个类型的题目,只是这道题目是对于二进制下的情况。而且高精度部分可以用两个long long数解决。
#include
#include
typedef long long ll;
const int N = 100;
con...
分类:
其他好文 时间:
2014-05-21 11:17:49
阅读次数:
222
如何往clob类型中插入一个超过10000 bytes 的字符串
You'll have to assign the value to a variable & use the variable to insert the data
DECLARE
v_long_text CLOB;
BEGIN
v_long_text := '...
分类:
其他好文 时间:
2014-05-21 09:14:36
阅读次数:
225
1: #include 2: #include 3: #include 4: #include 5:
#include 6: using namespace std; 7: 8: #define LL(a) a>1; 32: sub_build(subl,
mid, LL(subidx), idx)...
分类:
其他好文 时间:
2014-05-18 19:43:43
阅读次数:
395
http://acm.hdu.edu.cn/showproblem.php?pid=2066
求多源多汇的最短路,n最大为1000,floyd三重循环会超时。继续dijkstra吧。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#...
分类:
其他好文 时间:
2014-05-18 18:26:39
阅读次数:
238
1001
1002
1003
这题错了半天 伤不起 转成字符串搞字典树就错 最后直接位运算&建树就对了
AC代码
#include
#include
typedef __int64 LL;
const int maxn = 100010;
const int maxnode = 60000000;
const int sigma_size = 2;
LL a[maxn];
char...
分类:
其他好文 时间:
2014-05-18 04:47:04
阅读次数:
310
HDU 3555
BOMBhttp://acm.hdu.edu.cn/showproblem.php?pid=3555不能出现相邻的49正在学习。。。会了自己写#includeusing
namespace std;LL dp[21][3],n; int len,bit[21];//dp[i][0]...
分类:
其他好文 时间:
2014-05-15 21:18:59
阅读次数:
293
题意:求1-n(n
解法:数位dp。LL dp[pre][now][have][iflow][rem]记录着第pre位为now,have表示前边是否出现过13,iflow表示dp过程否有降低,rem表示后续需要的余数是多少。
代码:/******************************************************
* author:xiefubao
...
分类:
其他好文 时间:
2014-05-14 19:29:37
阅读次数:
266