[LUOGU] P2827 蚯蚓

  優先隊列模擬題意,有60分html 看了題解,蚯蚓切割後長度單調降低,能夠用三個隊列分別維護:未切割的蚯蚓,切割後長的蚯蚓,切割後短的蚯蚓。ios 每次從三個隊頭取出最大的,進行切割便可。git 本身寫了個殘缺的queue,qwqpost   #include<algorithm> #include<iostream> #include<cstdio> #include<queue> #inc
相關文章
相關標籤/搜索