
STL
文章平均质量分 66
Abandoninged
这个作者很懒,什么都没留下…
展开
-
STL中的几个容器的理解与应用
STL的代码从广义上讲分为三类:algorithm(算法)、container(容器)和iterator(迭代器),几乎所有的代码都采用了模板类和模版函数的方式。在C++标准中,STL被组织为下面的13个头文件:、、、、、、、、、、、和。举例来说,一个求方根的函数,在使用浮点数作为其参数类型的情况下的可重用性肯定比使用整型作为它的参数类性要高。而C++通过模板的机制允许推迟对某些类型的选择原创 2018-01-20 21:52:25 · 368 阅读 · 0 评论 -
CodeForces - 501B Misha and Changing Handles
Misha hacked the Codeforces site. Then he decided to let all the users change their handles. A user can now change his handle any number of times. But each new handle must not be equal to any handle t...原创 2018-07-23 18:27:15 · 262 阅读 · 0 评论 -
UVA - 10391 Compound Words
You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.InputSt...原创 2018-07-23 18:19:35 · 188 阅读 · 0 评论 -
HDU - 1027 Ignatius and the Princess II
Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first. feng5166 says, "I ha...原创 2018-07-23 18:15:44 · 202 阅读 · 0 评论 -
I
Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first. feng5166 says, "I ha原创 2018-01-20 22:26:37 · 219 阅读 · 0 评论 -
E
There is a bag-like data structure, supporting two operations:1 x Throw an element x into the bag.2 Take out an element from the bag.Given a sequence of operations with return values, you’re going to原创 2018-01-20 22:23:09 · 259 阅读 · 0 评论 -
D
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over t原创 2018-01-20 22:17:38 · 230 阅读 · 0 评论 -
C
Andy, 8, has a dream - he wants to produce hisvery own dictionary. This is not an easy task forhim, as the number of words that he knows is,well, not quite enough. Instead of thinking up allthe words原创 2018-01-20 22:12:48 · 237 阅读 · 0 评论 -
B
There are n pearls in a row. Let's enumerate them with integers from 1 to n from the left to the right. The pearl number i has the type ai.Let's call a sequence of consecutive pearls a segment. Le原创 2018-01-20 22:06:19 · 192 阅读 · 0 评论 -
A
You are given string s consists of opening and closing brackets of four kinds ,{}, [], (). There are two types of brackets: opening and closing. You can replace any bracket by another of the same ty原创 2018-01-20 22:01:19 · 329 阅读 · 0 评论 -
UVA - 136 Ugly Numbers
Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numbers. By convention, 1 is included. Write a program to ...原创 2018-07-23 18:42:19 · 279 阅读 · 0 评论