WA求调

P5788 【模板】单调栈

真就是单调队列与单调栈是大融合是吧
by Day_Of_Dream @ 2023-12-19 13:33:28


不是,单调栈只需要维护栈顶吧
by Day_Of_Dream @ 2023-12-19 13:33:58


然后答案每个数的答案就是把它弹出去的那个数的下标(用单调递增栈,从前往后扫)
by Day_Of_Dream @ 2023-12-19 13:35:18


@[wuyihao666](/user/708076)
by Day_Of_Dream @ 2023-12-19 13:35:43


|