首先已安装了apache2.2.22与tomcat7,并下载了相应的连接器文件mod_jk.so,存放于apache目录的modules下。我的电脑的安装路径如下:1、D:\server\Apache2.22、D:\server\tomcat73、在D:\server\Apache2.2\conf下...
题解:首先,按照题目要求生成数列,需要注意的是数据超过了int的范围,所以要开long long,然后,就用逆序对的思想求单调数列的个数。#include #include using namespace std;const int mod=1000000007;typedef long long ...
分类:
其他好文 时间:
2014-08-13 21:51:17
阅读次数:
190
Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are t...
分类:
其他好文 时间:
2014-08-13 18:43:47
阅读次数:
209
转自顺天乡华人论坛http://www.stxhr.tk/forum.php?mod=viewthread&tid=265&page=1&extra=#pid525 怀着满心的兴奋与期待来到首尔旅行的途中不小心丢失了重要的物品……相信再美好的旅程也会因此而留下遗憾吧。金钱上的损失也许还可以弥补...
分类:
其他好文 时间:
2014-08-13 14:43:06
阅读次数:
208
#include
#include
typedef unsigned long long ll;
const ll MOD = (1ULL<<32);
const int N = 500001;
int t, n;
ll ans[N], frc[N];
void init() {
for (ll i = 1; i < N; i++) {
for (ll j = i; j < ...
分类:
其他好文 时间:
2014-08-13 01:14:05
阅读次数:
218
矩阵快速幂1 while(N)2 {3 if(N&1)4 res=res*A;5 n>>=1;6 A=A*A;7 } 1 #include 2 using namespace std; 3 #deinfe mod 10000 4 struct matrix 5 {...
分类:
其他好文 时间:
2014-08-13 00:49:54
阅读次数:
214
1.ABS(X)取绝对值函数2.MOD(X,Y)取余数mod(4,3) =1mod(3,4)=33.CEIL(X)返回大于 或者等于X的最小整数4.FLOOR(X)返回小于或者等于X的最大整数5.POWER(X,Y)返回X的Y次幂6.SQRT(X)返回X的平方根7.ROUND(X,[Y])返回对X的...
分类:
数据库 时间:
2014-08-12 18:14:05
阅读次数:
299
以下是总结自他人博客资料,以及本人自己的学习经验。
【Baby_Step,Gaint_Step定义】
高次同余方程。 BL == N (mod
P)
求解最小的L。由于数据范围很大,暴力不行
这里用到baby_step,giant_step算法。意为先小步,后大步。
令L=i*m+j (m=ceil(sqrt(p-1))),
那么原式化为 B^(i*m)*B^j=...
分类:
其他好文 时间:
2014-08-12 13:48:24
阅读次数:
222
MATLAB函数表4.1.1特殊变量与常数ans计算结果的变量名computer确定运行的计算机eps浮点相对精度Inf无穷大I虚数单位inputname输入参数名NaN非数nargin输入参数个数nargout输出参数的数目pi圆周率nargoutchk有效的输出参数数目realmax最大正浮点数...
分类:
Web程序 时间:
2014-08-12 00:31:43
阅读次数:
953
X问题
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3305 Accepted Submission(s): 1071
Problem Description
求在小于等于N的正整数中有多少个X满足:X mod...
分类:
其他好文 时间:
2014-08-11 21:21:02
阅读次数:
184