We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议:特别说明一点,当同时存在多个转移值相等的 p[i] 时,只取下标最大的 p[i] , 不会影响答案
因为事实上,对于一个 i 可能有一段的结果相同的 p[i] (设为 [l[i], r[i]] ),对于一个 i' > i , 可能有一段结果相同的 p[i'] (设为 l[i'] , r[i']), 同时完全有可能这两段有长度大于1的重叠部分(r[i] ,l[i' ],且 r[i] < l[i'] ),则 p[i] 可以取 l[i'], p[i'] 可以取 r[i] , 此时就“不满足” 决策单调性了
但其实这并不会影响答案正确性,因为最小值结果相同的决策可任意取
因此建议说明这里的 p[i] 取得实际上是满足使得 dp [i] 最小后下标最大的
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
建议:特别说明一点,当同时存在多个转移值相等的 p[i] 时,只取下标最大的 p[i] , 不会影响答案
因为事实上,对于一个 i 可能有一段的结果相同的 p[i] (设为 [l[i], r[i]] ),对于一个 i' > i , 可能有一段结果相同的 p[i'] (设为 l[i'] , r[i']), 同时完全有可能这两段有长度大于1的重叠部分(r[i] ,l[i'
],且 r[i] < l[i'] ),则 p[i] 可以取 l[i'], p[i'] 可以取 r[i] , 此时就“不满足” 决策单调性了
但其实这并不会影响答案正确性,因为最小值结果相同的决策可任意取
因此建议说明这里的 p[i] 取得实际上是满足使得 dp [i] 最小后下标最大的
The text was updated successfully, but these errors were encountered: