题目如下:
Matrix Chain Multiplication
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is
associative, the order in which m...
分类:
其他好文 时间:
2014-05-10 04:40:36
阅读次数:
318
spfa找正环
XYZZY
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2344 Accepted Submission(s): 589
Problem Description
It has r...
分类:
其他好文 时间:
2014-05-09 22:57:45
阅读次数:
360
BFS。 1 #include 2 #include 3 #include 4
#include 5 using namespace std; 6 7 #define INF 0x3fffffff 8 9 typedef struct
node_st {10 int x, y, ...
分类:
其他好文 时间:
2014-05-09 20:18:48
阅读次数:
339
戳我去解题Given amxnmatrix, if an element is 0, set its
entire row and column to 0. Do it in
place.这题还是很简单的,就是有点坑,遍历矩阵的时候,每遇到0的时候,我们不能立即将所在行和列置0,否则,到最后矩阵所有...
分类:
其他好文 时间:
2014-05-09 08:51:57
阅读次数:
253
戳我去解题Write an efficient algorithm that searches for
a value in anmxnmatrix. This matrix has the following properties:Integers in
each row are sorted f...
分类:
其他好文 时间:
2014-05-09 08:27:24
阅读次数:
241
// Matrix.h#ifndef MATRIX_H#define
MATRIX_H#include#include#include#define rows 4#define cols 4#define L 6using
std::ostream;classMatrix{friend ostrea...
分类:
其他好文 时间:
2014-05-09 07:21:22
阅读次数:
353
畅通工程续
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 24979 Accepted Submission(s): 8900
Problem Description
某省自从实行了很多年的畅通工程计划后,...
分类:
其他好文 时间:
2014-05-09 06:12:04
阅读次数:
357
六度分离
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3859 Accepted Submission(s): 1567
Problem Description
1967年,美国著名的社会学家斯坦利·米尔...
分类:
其他好文 时间:
2014-05-09 02:00:04
阅读次数:
283
Minimum Transport Cost
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7007 Accepted Submission(s): 1791
Problem Description
The...
分类:
其他好文 时间:
2014-05-09 00:34:53
阅读次数:
345
这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来。 1 #include 2
#include 3 #include 4 5 char isPrime[100001]; 6 7 int main() { 8 int i, j, q, p,
maxi, maxj, m...
分类:
其他好文 时间:
2014-05-08 23:55:19
阅读次数:
515