![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STL
Wang_SF2015
这个作者很懒,什么都没留下…
展开
-
文章标题 codeforces 701B:Cells Not Under Attack(水+set)
Cells Not Under AttackDescriptionVasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks on the board one after another.The c原创 2016-08-09 19:31:32 · 156 阅读 · 0 评论 -
文章标题 CSU 1828 : Dictionary
1828: Dictionary1828: Dictionary 题意:有a,b,c,d,e,f,g,h,i组成的全排列(字典序),然后给出单词,问这个单词是第几个单词。 分析:显然可以直接用STL里面的next_permutation来就出全排列,然后拍一下序,然后对于每一个查找,可以直接用二分查找位置。 代码:#include<iostream>#include<string>#inc原创 2017-03-30 23:37:11 · 273 阅读 · 0 评论 -
文章标题 CSU 1815 : Enterprising Escape(BFS--优先队列)
Enterprising Escape1815: Enterprising Escape 题意:在一个w*h的矩形中,存在这每个单元有一个字符表示,总共有k中字符,每个字符有一个键值,表示要走过这个字符需要花费的时间,然后在这个矩阵中还有一个字符“E”,表示你所在的位置,然后要求从当前这个位置(即E的位置)走出这个矩阵花费的最少的时间。 分析:首先,每个字符和相应的键值可以用一个map来维护,然原创 2017-03-22 23:15:36 · 355 阅读 · 0 评论 -
文章标题 HDU 3172 : Virtual Friends (并查集+map)
Virtual FriendsThese days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their原创 2017-01-19 22:51:29 · 299 阅读 · 0 评论 -
文章标题 Coderforces 755B : PolandBall and Game(水)
PolandBall and GamePolandBall is playing a game with EnemyBall. The rules are simple. Players have to say words in turns. You cannot say a word which was already said. PolandBall starts. The Ball which原创 2017-01-16 13:18:59 · 184 阅读 · 0 评论 -
文章标题 Coderforces 382C :Arithmetic Progression(代码能力+细心分类)
Arithmetic ProgressionDescription Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a1, a2, …, an of length n原创 2016-11-27 15:23:12 · 311 阅读 · 0 评论 -
文章标题 HDU 1217 : Arbitrage(最短路--Floyd+map)
ArbitrageDescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dol原创 2016-10-30 21:26:40 · 371 阅读 · 0 评论 -
文章标题 HDU 5578 :Friendship of Frog(暴力+map)
Friendship of FrogDescription frogs from different countries are standing in a line. Each country is represented by a lowercase letter. The distance between adjacent frogs (e.g. the and the frog,原创 2016-11-05 23:34:56 · 426 阅读 · 1 评论 -
文章标题 codeforces 706B :Interesting drink( 水)
Interesting drinkDescriptionVasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink “Beecola”, which can be bought in n d原创 2016-08-15 08:54:50 · 145 阅读 · 0 评论 -
文章标题 CSU 1826: Languages(字符串的处理+map)
1826: Languages链接 1826: Languages 题意:有n种语言,然后每种语言都有自己的单词,然后有一些句子,里面中有某些单词属于其中一种语言,然后要我们判断每个句子是属于那中语言的,然后将这种语言输出来,注意这些单词不区分大小写。 分析:一开始看到这个题,第一想到的就是字典树,将每种语言的单词插入到字典树中,然后每次读井一个单词判断是属于那种语言的然后输出来,但这种方法对原创 2017-03-31 00:46:03 · 426 阅读 · 0 评论