Given an array A of integers, find the maximum of j-i subjected to the constraint of A[i] < A[j]. 以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。 多谢
r*y
2 楼
max sum of the subarray
【在 s**x 的大作中提到】 : Given an array A of integers, find the maximum of j-i subjected to the : constraint of A[i] < A[j]. : 以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。 : 多谢
【在 s**x 的大作中提到】 : Given an array A of integers, find the maximum of j-i subjected to the : constraint of A[i] < A[j]. : 以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。 : 多谢
r*y
5 楼
for example, a1, a2 , a3, a4, a5, then what is a5 - a1 ? a5 - a1 = (a2 - a1) + (a3 - a2) + (a4 - a3) + (a5 - a4) it is just a sum of an array
【在 s**x 的大作中提到】 : how? I do not see how they related.
but it's not asking for the biggest difference between a given pair of integers
【在 r*******y 的大作中提到】 : for example, a1, a2 , a3, a4, a5, then what is a5 - a1 ? : a5 - a1 = (a2 - a1) + (a3 - a2) + (a4 - a3) + (a5 - a4) : it is just a sum of an array