Description
Without 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 the problem called GF~. "
How good an oppo...
分类:
其他好文 时间:
2014-07-29 22:05:52
阅读次数:
420
Gauss elimination:#include #include #include #include using namespace std;const int MAXN = 50;int a[MAXN][MAXN];//增广矩阵int x[MAXN];//解集bool free_x[MAXN...
分类:
其他好文 时间:
2014-07-29 11:47:16
阅读次数:
225
Gauss Fibonacci
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2090 Accepted Submission(s): 903
Problem Description
Without exp...
分类:
其他好文 时间:
2014-07-27 23:40:00
阅读次数:
369
1.要求系数矩阵可逆2.A为增广矩阵,即A[i][n]为第i个方程右边的bi3.运行结束后A[i][n]即为第i个未知数的值typedef double Matrix[N][N];void gauss_elimination(Matrix A,int n){ int i,j,k,r; f...
分类:
其他好文 时间:
2014-07-22 00:27:38
阅读次数:
187
题目大意:
求出斐波那契中的 第 k*i+b 项的和。
思路分析:
定义斐波那契数列的矩阵
f(n)为斐波那契第n项
F(n) = f(n+1)
f(n)
那么可以知道矩阵
A = 1 1
1 0
使得 F(n) = A * F(n+1)
然后我们化简最后的答案
sum = F(b) + F(K+b) + F (2*k +...
分类:
其他好文 时间:
2014-07-08 14:47:19
阅读次数:
162
题目链接:uva 1415 - Gauss Prime
题目大意:给出一个a,b,表示高斯数a+bi(i=?2 ̄ ̄ ̄√,判断该数是否为高斯素数。
解题思路;
a = 0 时,肯定不是高斯素数a != 0时,判断a2+2b2是否为素数即可。
#include
#include
#include
bool is_prime (int n) {
int m = sqr...
分类:
其他好文 时间:
2014-07-06 08:36:51
阅读次数:
317
UVA 1415 - Gauss Prime
题目链接
题意:给定a + bi,判断是否是高斯素数,i = sqrt(-2)。
思路:普通的高斯素数i = sqrt(-1),判断方法为:
1、如果a或b为0,判断另一个数为4 * n + 3形式的素数(用到费马平方和定理)
2、如果a、b都不为0,判断a ^ 2 + b ^ 2 是否为素数
那么这题,提取出sqrt(2)...
分类:
其他好文 时间:
2014-07-01 06:29:11
阅读次数:
264
题目是要求建立一个方程组:
(mat[1][1]*x[1] + mat[1][2]*x[2] + … + mat[1][n]*x[n])%7 =mat[1][n+1]
(mat[2][1]*x[1] + mat[2][2]*x[2] + … + mat[2][n]*x[n])%7 =mat[2][n+1]
…
…
(mat[m][1]*x[1] + mat[m][...
分类:
其他好文 时间:
2014-06-30 10:56:17
阅读次数:
159
n个点,按照题中给的公式可以求出任意两个点转移的概率。求从1到n的期望转移次数...
分类:
其他好文 时间:
2014-05-09 22:53:59
阅读次数:
422