STL
sxk_sxy
努力用自己辛勤的汗水,成为一名真正的ACMer
展开
-
C++ STL算法汇总
C++ 算法(STL) 非修改性序列操作(12个) 循环 for_each() 对序列中的每个元素执行某操作 查找 find() 在序列中找出某个值的第一次出现的位置 find_if() 在序列中找出符合某谓词的第一个元素转载 2014-11-12 17:32:53 · 988 阅读 · 0 评论 -
URAL 1563. Bayan (STL map)
1563. Bayan Time limit: 1.0 second Memory limit: 64 MB As everybody knows, there are a lot of stores in skyscrapers, it's the favourite place of glamorous girls. Blonde Cindy loves only one原创 2015-06-01 13:09:12 · 721 阅读 · 0 评论 -
URAL 1654. Cipher Message (STL stack)
1654. Cipher Message Time limit: 1.0 second Memory limit: 64 MB Müller tried to catch Stierlitz red-handed many times, but alwaysfailed because Stierlitz could ever find some excuse. Once Sti原创 2015-05-30 13:44:24 · 793 阅读 · 0 评论 -
STL set
所需头文件:#include 成员函数: begin() 返回指向第一个元素的迭代器 clear() 清除所有元素 count() 返回某个值元素的个数 empty() 如果集合为空,返回true(真) end() 返回指向最后一个元素之后的迭代器,不是最后一个元素 equal_range() 返回集合中与给定值相等的上下限的两个迭代器 erase() 删除集合中的元素原创 2015-05-22 16:49:08 · 586 阅读 · 0 评论 -
HDU 2072 单词数 (STL map)
单词数 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 34960 Accepted Submission(s): 8380 Problem Description lily的好朋友xiaoou333最近很空,他原创 2015-05-03 18:34:53 · 675 阅读 · 0 评论 -
URAL 1496. Spammer
1496. Spammer Time limit: 1.0 second Memory limit: 64 MB There is a famous spammer among our friends. In the end of every contest he is submitting his incorrect solutions at the speed of原创 2015-03-11 07:51:16 · 895 阅读 · 0 评论 -
URAL 1880 Psych Up's Eigenvalues (技巧)
Psych Up's Eigenvalues Time limit: 0.5 second Memory limit: 64 MB At one of the contests at the Petrozavodsk Training Camp, players of the Psych Up team quickly found the simple problem a原创 2015-03-04 19:15:33 · 692 阅读 · 0 评论 -
STL map
转自:sunshinewave map的详细用法 map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一种非严格意义上的平衡二叉树)原创 2014-07-25 09:41:13 · 681 阅读 · 0 评论 -
Codeforces Round #135 (Div. 2)---A. k-String
k-String time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A string is called a k-string if it can be repre原创 2014-10-31 01:29:42 · 1182 阅读 · 0 评论 -
HDU 4585 Shaolin(STL map)
Shaolin Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4585 Description Shaolin temple is very famous for its Kongfu monks.A原创 2014-10-04 00:01:30 · 1722 阅读 · 0 评论 -
HDU 1075 What Are You Talking About (strings)
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 15966 Accepted Submission(s): 5177 Problem Descriptio原创 2015-07-13 10:37:07 · 753 阅读 · 0 评论