STL
文章平均质量分 71
bingsanchun
这个作者很懒,什么都没留下…
展开
-
The Next Permutation
原题:Description<!--@page {margin:2cm}p {margin-bottom:0.21cm; direction:ltr; color:#000000; text-align:justify; widows:0; orphans:0}p.western {font-family:"Times New Roman原创 2013-05-20 20:56:21 · 977 阅读 · 1 评论 -
POJ2503——Babelfish
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.原创 2013-10-15 20:29:27 · 1003 阅读 · 0 评论 -
UVA11991——Easy Problem from Rujia Liu?(map+vector)
Though Rujia Liu usually sets hard problems for contests (for example, regional contests like Xi'an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu's Presents 1 and 2), he occasio原创 2013-11-18 22:40:11 · 1500 阅读 · 0 评论 -
Map映照容器
1、Map映照容器 map创建元素插入和遍历访问//创建map对象 键值与映照数据的类型自己定义 在默认比较函数下 元素的插入按键值小到大#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(原创 2013-08-14 16:14:52 · 942 阅读 · 0 评论 -
Priority_queue优先队列容器
Priority_queue优先队列容器和队列一样只能在队尾插入队首删除但有个特性是队列中的最大元素总是位于队首所以出队时并非按先进先出的原则进行而是将当前队列中最大的元素出队这点类似给队列中的元素进行了默认的大到小的顺序排列重载“”可以重新定义比较规则Priority_queue优先队列容器优先队列的使用方法使用push()入队插入元素 pop()出队删除元素 top()读取队首原创 2013-08-14 19:27:22 · 861 阅读 · 0 评论 -
LA3135——Argus(优先队列)
DescriptionA data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs s原创 2013-11-19 08:21:00 · 1607 阅读 · 0 评论 -
HDU2578--Dating with girls(1) (map||排序+二分)
Problem DescriptionEveryone in the HDU knows that the number of boys is larger than the number of girls. But now, every boy wants to date with pretty girls. The girls like to date with the boys with原创 2013-11-06 19:30:32 · 1172 阅读 · 0 评论 -
FZU-单词问题
Problem Description给出一个完整的句子,这个句子中不包含不可见字符或者空格,于是在这个句子中有许多不同的单词。一个单词是指一串连续的最长的英文字母(大写或小写)。例如"#abc#"中,"abc"就是一个单词,而"ab","bc"都不算单词。 Input输入包含多组数据 输入数据第一行是一个句子,只包含可见字符(不包含空格)。句子长度不超过 100。 Out原创 2013-11-10 23:48:23 · 1170 阅读 · 0 评论 -
Codeforces Round #215 (Div. 2) -B. Sereja and Suffixes
B. Sereja and Suffixestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja has an array a, consisting of n intege原创 2013-11-27 11:05:21 · 1249 阅读 · 0 评论 -
Bitset位集合容器
Bitset容器是一个bit位元素的序列容器每个元素只占一个bit位取值非0即1因而很节省空间他的10个元素只使用了两个字节的空间Bitset位集合容器创建bitset对象创建bitset对象时一定要指定容器大小大小一定义就不能修改 #include "stdafx.h"#include "iostream"#include "bitset"using namesp原创 2013-08-14 19:26:22 · 812 阅读 · 0 评论 -
HDU1004——Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i原创 2013-08-14 15:09:45 · 778 阅读 · 0 评论 -
min_element
返回一个最小值的指针 int count=*min_element(b,b+7); cout原创 2013-06-06 13:52:24 · 496 阅读 · 0 评论 -
定义函数模板
#include#includeusing namespace std;//定义函数模板template //template 是关键字,T 表示一种待实例化的类型//template 也是对的T MAX(T a, T b)//函数模板,函数名为 max,此函数有2个T类型的参数,返回类型为T{ return (a>b)?a:b;}//在此例实例化的时候,T可以是多原创 2013-08-12 20:51:40 · 794 阅读 · 0 评论 -
STL初涉~
STL入门系列~原创 2013-08-13 16:14:46 · 780 阅读 · 0 评论 -
Set集合容器
1、set集合容器创建set集合对象 //创建set对象时 要指定元素类型 元素排列按默认比较规则 比较规则可以自己定义#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){ sets; ret原创 2013-08-14 08:57:33 · 1117 阅读 · 0 评论 -
Multiset多重集合容器
1、Multiset多重集合容器 multiset元素的插入//插入重复键值#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){ multiset ms; ms.insert("111原创 2013-08-14 09:09:08 · 972 阅读 · 0 评论 -
String基本字符系列容器
1、/*创建s 空字符串*/#include#include#include#include#include#include#include#includeusing namespace std;int main(){ string s; cout<<s.length()<<endl; return 0;} 2、基本字符系列容器给string对象赋值原创 2013-08-13 20:21:44 · 977 阅读 · 0 评论 -
Multimap多重映照容器
1、Multimap多重映照容器 multimap对象的创建和元素插入//可使用insert()重复插入元素#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){ int原创 2013-08-14 16:38:17 · 734 阅读 · 0 评论 -
Deque双端队列容器
1、Deque双端队列容器创建deque对象//可创建无任何元素的或者具有n个元素的或者具有n个元素的并赋初值的#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main()原创 2013-08-14 17:02:50 · 723 阅读 · 0 评论 -
HDU——2095find your present (2)
Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will原创 2013-08-14 10:58:52 · 887 阅读 · 0 评论 -
STL归并排序
#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){ int n; int a[99999]; while(scanf("%d"原创 2013-12-04 23:48:39 · 10597 阅读 · 0 评论