2620

51nod 2620 序列问题

原题 首先 \(O(n \log n)\) 的贪心很好想,显然用堆,每次合并两个权值最小的即可 然后考虑 \(O(n)\) 怎么做?我们发现这个权值 \(\max(a_i,a_{i+1})\) 的 \(\max\) 很不好处理,因此我们考虑把他优化一下 使用单调栈可以求出权值为 \(a_i\) 的合 ......
序列 问题 2620 nod 51

COMP2620/COMP6262 Logic Course

Assignment 1, Logic CourseCOMP2620/COMP6262/PHIL2080General Comments Due date is 16 April, 23:59pm (Canberra time). The two questions in this assignme ......
COMP Course Logic 2620 6262
共2篇  :1/1页 首页上一页1下一页尾页