题意:求矩阵的次方和解题思路:最容易想到方法就是两次二分因为 我们可以把一段 A^1 + A^2 + .......A^K 变成 A^1 + ..A^(K/2) +(A^1 + ..A^(K/2))*(A^(k/2)) 当k 为奇数的时候 或者A^1 + ..A^(K/2) +(A^1 + ..A....
分类:
其他好文 时间:
2014-09-18 14:37:34
阅读次数:
274
Matrix Power Series
Time Limit: 3000MS
Memory Limit: 131072K
Total Submissions: 15417
Accepted: 6602
Description
Given a n × n matrix A and a positive integer k, ...
分类:
其他好文 时间:
2014-09-18 13:20:00
阅读次数:
230
题目大意:给一个n*n的方阵A,令S=A+A^2+...+A^k 给定k,m输出这样的S方阵,里面的每一项模m后的结果。方阵中的元素可以是方阵.令S(i)=A+A^2+...+A^i那么观察相邻的两个SS(i-1)=A+A^2+...+A^(i-1)S(i)=A+A^2+...+A^(i-1)+A^...
分类:
其他好文 时间:
2014-09-17 21:48:22
阅读次数:
309
题目地址:POJ 3233
题目大意:给定矩阵A,求A + A^2 + A^3 + … + A^k的结果(两个矩阵相加就是对应位置分别相加)。输出的数据mod m。k
这道题两次二分,相当经典。首先我们知道,A^i可以二分求出。然后我们需要对整个题目的数据规模k进行二分。比如,当k=6时,有:
A + A^2 + A^3 + A^4 + A^5 + A^6 =(A + A^2...
分类:
其他好文 时间:
2014-09-17 18:46:52
阅读次数:
272
gem5模拟器提供了四个不同的CPU模型,两个不同的系统模型以及两个不同的内存系统模型,并且支持多种指令集(ARM、ALPHA、MIPS、Power、SPARC和x86),其中可以再ARM、ALPHA和x86三种架构上运行Linux。gem5的许可证是基于BSD的,这就为工业界和学术界的合作搭建了一个好的桥梁。虽然开发一个Full-system的模拟器是很复杂的,但gem5正在借助开源的强大合作力(如mailing lists,wiki,web-based patch reviews,a publicly ...
分类:
其他好文 时间:
2014-09-16 09:16:30
阅读次数:
364
k&r习题4-2,扩充使可以处理科学计数法形式 #include<ctype.h>
double atof(char s[])
{
double val, power, e_sum;
int e_val;
int i, sign, e_sign;
for (i = 0; s[i] == ‘ ‘; i++);
sign = (s[i] == ‘-...
分类:
其他好文 时间:
2014-09-14 16:47:37
阅读次数:
374
Problem DescriptionAfter eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power for several times. He...
分类:
其他好文 时间:
2014-09-14 12:39:27
阅读次数:
299
Power NetworkTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onPKU. Original ID:145964-bit integer IO format:%lld Java class name:M...
分类:
Web程序 时间:
2014-09-13 12:00:39
阅读次数:
201
Description
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti...
分类:
其他好文 时间:
2014-09-13 09:23:34
阅读次数:
197
一、对clock的基本认识 1 s3c2410的clock & power management模块包含三个部分:clock control、usb control、power control。现在的关注点是clock control。 2、s3c2410有两个pll(phase locked l....
分类:
其他好文 时间:
2014-09-12 21:54:34
阅读次数:
286