摘要: 参考:http://www.cplusplus.com/reference/set/set/ 一、set 是按特定顺序存储唯一元素的容器 实现是一种非常高效的平衡检索二叉树:红黑树(Red-Black Tree)。 二、set 的特性 1、set中的元素都是排好序的(与lower_bound()等结 阅读全文
posted @ 2018-08-01 15:09 莜莫 阅读(293) 评论(0) 推荐(0)
摘要: 直奔代码: 阅读全文
posted @ 2018-07-31 12:25 莜莫 阅读(233) 评论(0) 推荐(0)
摘要: 包含头文件: 申请: 1 rope text; 基本操作: 阅读全文
posted @ 2018-07-31 02:16 莜莫 阅读(452) 评论(0) 推荐(0)
摘要: 题目链接:https://www.nowcoder.com/acm/contest/141/C 题目描述 Eddy likes to play cards game since there are always lots of randomness in the game. For most of 阅读全文
posted @ 2018-07-31 02:09 莜莫 阅读(166) 评论(0) 推荐(0)
摘要: 题目链接:POJ 1195 Mobile phones Mobile phones Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 21926 Accepted: 10200 Description Suppose that th 阅读全文
posted @ 2018-07-31 01:36 莜莫 阅读(135) 评论(0) 推荐(0)
摘要: 题目链接:POJ 2365 Rope Rope Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7488 Accepted: 2624 Description Plotters have barberically hammered 阅读全文
posted @ 2018-07-31 00:22 莜莫 阅读(296) 评论(0) 推荐(0)
摘要: 参考:http://www.cnblogs.com/xzxl/p/7266404.html 一、基本定义: 优先队列容器与队列一样,只能从队尾插入元素,从队首删除元素。但是它有一个特性,就是队列中最大的元素总是位于队首,所以出队时,并非按照先进先出的原则进行,而是将当前队列中最大的元素出队。这点类似 阅读全文
posted @ 2018-07-30 23:20 莜莫 阅读(377) 评论(0) 推荐(0)
摘要: 题目链接:POJ 3067 Japan Japan Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 32076 Accepted: 8620 Description Japan plans to welcome the ACM I 阅读全文
posted @ 2018-07-30 00:51 莜莫 阅读(158) 评论(0) 推荐(0)
摘要: 题目: F Beautiful Garden 题目描述 There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partitioned into n x m equal-sized squ 阅读全文
posted @ 2018-07-29 16:28 莜莫 阅读(238) 评论(0) 推荐(0)
摘要: 链接:https://www.nowcoder.com/acm/contest/142/G 来源:牛客网 题目描述 The mode of an integer sequence is the value that appears most often. Chiaki has n integers 阅读全文
posted @ 2018-07-29 11:36 莜莫 阅读(264) 评论(0) 推荐(0)