4 solutions

  • 0
    @ 2021-10-14 20:41:02

    最长连续子序列和问题,我用了dp,状态转移方程是f[i] = max(f[i-1]+a[i],a[i]);但因为我实在是太弱了,没想到怎么找出两个边界,我只能又遍历了两次,等于最大值的i就是右边界,然后我从i往左找,再找左边界qaq

    Information

    ID
    77
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    326
    Accepted
    47
    Uploaded By