摘要: P1090 [NOIP2004 提高组] 合并果子 / [USACO06NOV] Fence Repair G这是一道贪心算法的题目,每次选择两个最小的堆,合并后,继续直到只有一堆为止,可能用multiset进行维护。 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2022-03-12 19:34 心悟&&星际 阅读(63) 评论(0) 推荐(1)
摘要: P1886 滑动窗口 /【模板】单调队列 //60分 #include<bits/stdc++.h> using namespace std; vector <int> Maxv,Minv; struct Maxnode { int val; int i; bool operator <(const 阅读全文
posted @ 2022-03-12 08:03 心悟&&星际 阅读(30) 评论(0) 推荐(0)