
数据结构
XMzhou
当你想要放弃的时候问问自己为什么坚持到了现在
展开
-
STL之set使用方法小结
/*set/multiset会根据待定的排序准则,自动将元素排序。两者不同在于前者不允许元素重复,而后者允许。1) 不能直接改变元素值,因为那样会打乱原本正确的顺序,要改变元素值必须先删除旧元素,则插入新元素2) 不提供直接存取元素的任何操作函数,只能通过迭代器进行间接存取,而且从迭代器角度来看,元素值是常数3) 元素比较动作只能用于型别相同的容器(即元素和排序准则必须相同)set模板原转载 2013-07-25 22:39:38 · 665 阅读 · 0 评论 -
STL容器
STL的容器可以分为以下几个大类: 一:序列容器, 有vector, list, deque, string.二 : 关联容器, 有set, multiset, map, mulmap, hash_set, hash_map, hash_multiset, hash_multimap三: 其他的杂项: stack, queue, valarray, bitset转载 2013-08-03 19:34:00 · 625 阅读 · 0 评论 -
UVA 11995
Problem II Can Guess the Data Structure!There is a bag-like data structure, supporting two operations:1 xThrow an element x into the bag.2Take out an element from the bag.Given a seque原创 2013-08-05 15:07:33 · 851 阅读 · 0 评论 -
UVA 11235
2007/2008 ACM International Collegiate Programming Contest University of Ulm Local ContestProblem F: Frequent valuesYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasin原创 2013-08-06 09:27:57 · 927 阅读 · 0 评论 -
UVA 11136 —— 简单STL
Problem H: Hoax or whatEach Mal-Wart supermarket has prepared a promotion scheme run by the following rules:A client who wants to participate in the promotion (aka a sucker) must write down th原创 2013-08-08 18:54:22 · 716 阅读 · 0 评论 -
UVA 11732 —— 左儿子右兄弟表示法&&Tire
11732 - strcmp() Anyone?Time limit: 2.000 secondsJ“strcmp()” Anyone?Input: Standard InputOutput: Standard Output strcmp() is a library function in C/C++ which原创 2013-08-27 14:46:25 · 1284 阅读 · 0 评论 -
POJ 2559 —— 栈
Largest Rectangle in a HistogramTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12796 Accepted: 4133DescriptionA histogram is a polygon composed of a se原创 2013-11-07 20:15:49 · 760 阅读 · 0 评论