![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
------ STL ------
文章平均质量分 87
叶孤心丶
这个作者很懒,什么都没留下…
展开
-
优先队列
优先队列:顾名思义,首先它是一个队列,但是它强调了“优先”二字,所以,已经不能算是一般意义上的队列了,它的“优先”意指取队首元素时,有一定的选择性,即根据元素的属性选择某一项值最优的出队~百度百科上这样描述的: 优先级队列 是不同于先进先出队列的另一种队列。每次从队列中取出的是具有最高优先权的元素 优先队列的类定义 优先队列是0个或多个元素的集合,每个元素都有一个优先权或转载 2014-08-05 19:21:37 · 409 阅读 · 0 评论 -
UVA FILL(BFS + 优先队列)
Problem DFILL There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the原创 2015-01-27 23:49:19 · 796 阅读 · 0 评论 -
第四届山东省赛 Thrall’s Dream(BFS+vector)
2218: Thrall’s DreamTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 253 Solved: 72[Submit][Status][Web Board]DescriptionWe never paid any heed to the ancient prophecies, like fools we cl原创 2015-04-07 20:17:44 · 963 阅读 · 0 评论 -
SDUT 2139 图结构练习——BFS——从起始点到目标点的最短步数(BFS + vector)
图结构练习——BFS——从起始点到目标点的最短步数Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述 在古老的魔兽传说中,有两个军团,一个叫天灾,一个叫近卫。在他们所在的地域,有n个隘口,编号为1..n,某些隘口之间是有通道连接的。其中近卫军团在1号隘口,天灾军团在n号隘口。某一天,天灾原创 2015-04-23 20:12:43 · 614 阅读 · 0 评论 -
SDUT 2158 Hello World!(第一届山东省赛)
Hello World!Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述We know that Ivan gives Saya three problems to solve (Problem F), and this is the first problem.“We nee原创 2015-04-27 20:53:31 · 863 阅读 · 0 评论 -
SDUT 2830 图练习-BFS-从起点到目标点的最短步数(BFS + vector)
图练习-BFS-从起点到目标点的最短步数Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述在古老的魔兽传说中,有两个军团,一个叫天灾,一个叫近卫。在他们所在的地域,有n个隘口,编号为1..n,某些隘口之间是有通道连接的。其中近卫军团在1号隘口,天灾军团在n号隘口。某一天,天灾军团的领袖巫原创 2015-04-27 20:38:45 · 675 阅读 · 0 评论 -
POJ 2442 Sequence(堆的应用)
SequenceTime Limit: 6000MS Memory Limit: 65536KTotal Submissions: 8269 Accepted: 2705DescriptionGiven m sequences, each contains n non-negative integer. Now we ma原创 2015-08-03 15:08:57 · 359 阅读 · 0 评论 -
POJ 1442 Black Box(优先队列)
Black BoxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8710 Accepted: 3576DescriptionOur Black Box represents a primitive database. It can save an int原创 2015-08-03 16:43:26 · 642 阅读 · 0 评论 -
HDU 5349 MZL's simple problem(优先队列)
MZL's simple problemTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 776 Accepted Submission(s): 375Problem DescriptionA simpl原创 2015-08-05 15:12:36 · 585 阅读 · 0 评论 -
HDU 5360 Hiking(优先队列)
HikingTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 492 Accepted Submission(s): 263Special JudgeProblem DescriptionThere原创 2015-08-07 10:48:06 · 959 阅读 · 0 评论 -
UVA Babelfish(STL map)
Problem C: BabelfishYou 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 understan原创 2015-01-28 00:05:31 · 584 阅读 · 0 评论 -
UVA Compound Words(STL map)
Problem E: Compound WordsYou 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原创 2015-01-28 00:07:52 · 636 阅读 · 0 评论 -
SDUTOJ 2506 完美网络
完美网络Time Limit: 1000MS Memory limit: 65536K题目描述完美网络是连通网络的基础上要求去掉网络上任意一条线路,网络仍然是连通网络。求一个连通网络要至少增加多少条边可以成为完美网络。输入第一行输入一个数T代表测试数据个数(T(0输出对于每个样例输出最少增加多少线路可以成为完美原创 2014-11-25 21:01:48 · 845 阅读 · 0 评论 -
Message Flood
Message FloodTime Limit:1500MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice SDUTOJ 1500DescriptionWell, how do you feel about mobile phone? Your原创 2014-08-07 20:09:55 · 470 阅读 · 0 评论 -
树-堆结构练习——合并果子之哈夫曼树
树-堆结构练习——合并果子之哈夫曼树Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice SDUTOJ 2127Description 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多原创 2014-08-07 20:02:41 · 678 阅读 · 0 评论 -
Message Flood《STL》
Message FloodTime Limit: 1500ms Memory limit: 65536K 有疑问?点这里^_^题目描述Well, how do you feel about mobile phone? Your answer would probably be something like that "It's so conve原创 2014-08-25 21:17:20 · 410 阅读 · 0 评论 -
POJ 2418 Hardwood Species
B - Hardwood SpeciesTime Limit:10000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2418DescriptionHardwoods are the botanical group of原创 2014-08-07 20:05:02 · 484 阅读 · 0 评论 -
HDU 2736 Surprising Strings
C - Surprising StringsTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3096DescriptionThe D-pairs of a string of letters a原创 2014-08-07 20:04:00 · 476 阅读 · 0 评论 -
POj 3511 Fermat’s Chirstmas Theorem
E - Fermat’s Chirstmas TheoremTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice SDUTOJ 2093DescriptionIn a letter dated December 25原创 2014-08-07 20:16:27 · 665 阅读 · 0 评论 -
HDU1873 看病要排队
E - 看病要排队Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription看病要排队这个是地球人都知道的常识。不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少原创 2014-11-15 17:20:22 · 1498 阅读 · 0 评论 -
SDUTOJ 2087 离散事件模拟-银行管理(队列)
离散事件模拟-银行管理Time Limit: 1000MS Memory limit: 65536K题目描述 现在银行已经很普遍,每个人总会去银行办理业务,一个好的银行是要考虑 平均逗留时间的,即: 在一定时间段内所有办理业务的人员逗留的时间的和/ 总的人数。逗留时间定义为 人员离开的时间减去人员来的时间。银行只有考虑了这一点,我们在办理业务的时原创 2014-11-25 16:10:34 · 1406 阅读 · 0 评论 -
SDOTOJ2088 refresh的停车场(栈和队列)
refresh的停车场Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescription refresh最近发了一笔横财,开了一家停车场。由于土地有限,停车场内停车数量有限,但是要求进停车场的车辆过多。当停车场满时,要进入的车辆会原创 2014-11-20 19:42:57 · 1011 阅读 · 0 评论 -
全排列(STL)
#include #include #include#include#includeusing namespace std;int n,m;void per(char* list, int length){ sort(list, list + length); do { for(int i = 0; i < length; i++)原创 2015-05-19 11:34:37 · 649 阅读 · 0 评论