最大字段和
Ac-try
这个作者很懒,什么都没留下…
展开
-
uva_108 - Maximum Sum
BackgroundA problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying a boolean expression in conjunctive normal form i原创 2014-11-20 19:59:40 · 332 阅读 · 0 评论 -
UVA--836 Largest Submatrix
Let A be an N×N matrix of zeros and ones. A submatrix S of A is any group of contiguous entries that forms a square or a rectangle.Write a program that determines the number of elements of the lar原创 2014-11-22 12:01:18 · 346 阅读 · 0 评论 -
Maximum Subarray模板
初步学习 正确性还有待考证1.周原创 2014-11-20 01:22:57 · 296 阅读 · 0 评论 -
UVA--507 Jill Rides Again
Jill Rides Again Jill likes to ride her bicycle, but since the pretty city of Greenhills where she lives has grown, Jill often uses the excellent public bus system for part of her jour原创 2014-11-22 14:55:38 · 304 阅读 · 0 评论 -
UVa -- 10324 Zeros and Ones
#include#include#includeusing namespace std;const int maxn=1000100;char f[maxn];int main(){ int a,b,n,cnt=1; while(scanf("%s",f)==1){ printf("Case %d:\n",cnt);原创 2014-03-29 00:06:00 · 549 阅读 · 0 评论 -
UVA--10827 Maximum sum on a torus
A grid that wraps both horizontally and vertically is called a torus. Given a torus where each cell contains an integer, determine the sub-rectangle with the largest sum. The sum of a sub-rectangle is原创 2014-11-23 09:22:04 · 322 阅读 · 0 评论