摘要:
解法一:时间复杂度为O(N*N) ,暴力所有分组情况。 解法二:时间复杂度为O(2*N)。 思路:对数组预处理,构造两个辅助数组——左区间数组,右区间数组。将 [0, i ] 的最大值存入左区间数组记为L[i]。 将 ( i , N ] 的最大值记为R[ i ],最后遍历数组。 解法三:时间复杂度O 阅读全文
摘要:
C. Nephren gives a riddle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Nephren giv 阅读全文
摘要:
C. Ice Cave time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You play a computer game. Yo 阅读全文