![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++编程
文章平均质量分 73
ericyelei
这个作者很懒,什么都没留下…
展开
-
最大子序列问题
问题:输入一个整形数组,有正数、负数或者零。数组中连续的一段序列成为其子序列。求出所有子序列中元素和最大的子序列,写出路径和元素和。 代码参考如下: /** * *By Eric **/ #include #include using namespace std; #define MAX 100 int main() { int N; //原创 2011-11-14 18:28:25 · 434 阅读 · 0 评论 -
最大子矩阵问题(POJ1050)
Question:Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is t原创 2011-11-15 20:46:51 · 427 阅读 · 0 评论 -
二叉树两节点的最短路径(Homework2 of Advanced Network)
问题:按层序从root节点开始给一个完全二叉树标号,对任意两个节点,求其最短路径。 描述:二叉树的最短路径问题可以转化为求两个节点最小公共父节点问题,而两节点到最小公共父节点的路径即为所求。 代码如下: #include using namespace std; int main() { int A,B; //两个节点 cout<<"Please原创 2011-11-13 21:57:00 · 2753 阅读 · 0 评论