随笔分类 -  STL

deque双端队列用法
摘要:#include #include #include #include using namespace std; deque dq; int main() { dq.push_front(102);///插入头部 dq.push_back(101);///插入尾部 sort(dq.begin(),dq.end()); deque::iterator it ... 阅读全文

posted @ 2017-05-15 15:58 hnust_accqx 阅读(290) 评论(0) 推荐(0)

随机生成数,摘自算法竞赛入门经典P120-P123测试STL。
摘要://#include #include #include #include #include///调用time的头文件。 #include #include #include///调用rand的头文件。 #include///assert的头文件。 #define LL long long using namespace std; void fill_random_int(vector&v,i... 阅读全文

posted @ 2017-05-15 12:59 hnust_accqx 阅读(290) 评论(0) 推荐(0)

ZOJ 3963 Heap Partition set维护。给一个序列,将其划分成尽量少的序列,使每一个序列满足按照顺序构造二叉树,父母的值<=孩子的值。
摘要:Heap Partition Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge A sequence S = {s1, s2, ..., sn} is called heapable if there exists a binary tree T with n nodes such that every n... 阅读全文

posted @ 2017-04-23 10:16 hnust_accqx 阅读(321) 评论(0) 推荐(0)

导航