链接看此题前先看一下matrix67大神写的关于十个矩阵的题目中的一个,如下:经典题目8
给定一个有向图,问从A点恰好走k步(允许重复经过边)到达B点的方案数mod
p的值把给定的图转为邻接矩阵,即A(i,j)=1当且仅当存在一条边i->j。令C=A*A,那么C(i,j)=ΣA(i,k)*A(k,j...
分类:
其他好文 时间:
2014-05-20 02:46:43
阅读次数:
249
题目描述Given a number sequence whose length is n, you
can delete at most k numbers in the sequence.After that you are asked to answer
the maximum length ...
分类:
其他好文 时间:
2014-05-19 22:21:32
阅读次数:
304
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-05-18 20:30:16
阅读次数:
301
控制焦点Focus on Control 的取值:Alternative
fragment(denoted “alt”) 与 if…then…else对应Option fragment (denoted “opt”) 与
Switch对应Parallel fragment (denoted “par...
分类:
其他好文 时间:
2014-05-17 22:05:02
阅读次数:
298
题目1:Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie,...
分类:
其他好文 时间:
2014-05-16 01:46:15
阅读次数:
460
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-05-16 00:34:50
阅读次数:
354
http://www.csdn.net/article/2014-05-04/2819586-the-best-xcode-plugins5.KSImageNamedKSImageNamed是一款能够帮助开发者在Xcode中自动补全图片文件名称的插件,其开发者Kent
Sutherland来自美国波...
分类:
其他好文 时间:
2014-05-16 00:13:44
阅读次数:
355
The modernization of world had led to coming of
many businesses online. Businesses have realized the importance of coming up
online. That is the main ...
分类:
其他好文 时间:
2014-05-15 10:14:55
阅读次数:
364
【题目】
A sequence of N positive integers (10 N , each of them less than or equal 10000, and a positive integer S (S <
100 000 000) are given. Write a program to find the minimal length of the subse...
分类:
其他好文 时间:
2014-05-15 07:58:17
阅读次数:
329
Humble Numbers
题目描述
A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the fi...
分类:
其他好文 时间:
2014-05-15 01:36:22
阅读次数:
230