本蒟蒻看见了并未考虑不升时同高度不接受 的情况的程序AC,发帖表达疑惑。
while (top && each.height >= stack[top].height) { energy[i] += stack[top].power; top--; }