精華區beta CSSE 關於我們 聯絡資訊
Given a sequence of n numbers, find the longest continuous subsequence that has the largest sum. algorithm must be less than O(n^2) 這一整個數列可能是 10, -1, 900, 12, -35... 找出一段讓它的總和最大 時間在O(n^2) 請問這題是問LCS嗎? 還是什麼其它的方法? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.228.31.153
tkcn:簡單的 dp 吧 05/26 22:20
tkcn:對了,這種問題到 Prob_Solve 比較適合。 05/26 22:30