[LUOGU] P2827 蚯蚓

  优先队列模拟题意,有60分html 看了题解,蚯蚓切割后长度单调降低,能够用三个队列分别维护:未切割的蚯蚓,切割后长的蚯蚓,切割后短的蚯蚓。ios 每次从三个队头取出最大的,进行切割便可。git 本身写了个残缺的queue,qwqpost   #include<algorithm> #include<iostream> #include<cstdio> #include<queue> #inc
相关文章
相关标签/搜索