Fork me on GitHub

  2013年1月14日
摘要: DescriptionGiven an×nmatrixAand a positive integerk, find the sumS=A+A2+A3+ … +Ak.InputThe input contains exactly one test case. The first line of input contains three positive integersn(n≤ 30),k(k≤ 109) andm(m< 104). Then follownlines each containingnnonnegative integers below 32,768, givin 阅读全文
posted @ 2013-01-14 20:58 huashiyiqike 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题目描述:给定a0,a1,以及an=p*a(n-1) + q*a(n-2)中的p,q。这里n >= 2。 求第k个数对10000的模。输入:输入包括5个整数:a0、a1、p、q、k。输出:第k个数a(k)对10000的模。样例输入:20 1 1 14 5样例输出:8359p q 矩阵二维!用一维数组实现 三维则更多#include "stdio.h"#include "stdlib.h"#include"string.h"#include "algorithm"void mul(__int64 *a,__in 阅读全文
posted @ 2013-01-14 16:20 huashiyiqike 阅读(340) 评论(0) 推荐(0) 编辑