随笔分类 -  队列、优先队列、单调队列

摘要:/*StripiesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10270 Accepted: 4976DescriptionOur chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English ... 阅读全文
posted @ 2013-08-03 09:00 myth_HG 阅读(428) 评论(0) 推荐(0)
摘要:/*Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19914 Accepted: 6314DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer l... 阅读全文
posted @ 2013-08-02 09:22 myth_HG 阅读(5368) 评论(0) 推荐(0)
摘要:/*ZOJ Problem Set - 3230Solving the Problems--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 32768 KB--------------------------------------------------------------------------------Programming is fun, Aaron is addicted to it. In... 阅读全文
posted @ 2013-07-31 17:16 myth_HG 阅读(264) 评论(0) 推荐(0)
摘要:/*ZOJ Problem Set - 3410Layton's Escape--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 65536 KB--------------------------------------------------------------------------------Professor Layton is a renowned archaeologist from Lo. 阅读全文
posted @ 2013-07-31 10:45 myth_HG 阅读(377) 评论(0) 推荐(0)
摘要:/*Gu Jian Qi Tan--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 65536 KB --------------------------------------------------------------------------------Gu Jian Qi Tan is a very hot Chinese RPG in this summer vacation. SuSu is ... 阅读全文
posted @ 2013-07-30 20:10 myth_HG 阅读(480) 评论(0) 推荐(0)
摘要:优先队列:顾名思义,首先它是一个队列,但是它强调了“优先”二字,所以,已经不能算是一般意义上的队列了,它的“优先”意指取队首元素时,有一定的选择性,即根据元素的属性选择某一项值最优的出队~百度百科上这样描述的: 优先级队列 是不同于先进先出队列的另一种队列。每次从队列中取出的是具有最高优先权的元素 优先队列的类定义 优先队列是0个或多个元素的集合,每个元素都有一个优先权或值,对优先队列执行的操作有1) 查找;2) 插入一个新元素;3) 删除.在最小优先队列(min priorityq u e u e)中,查找操作用来搜索优先权最小的元素,删除操作用来删除该元素;对于最大优先队列(ma... 阅读全文
posted @ 2013-07-30 16:06 myth_HG 阅读(58208) 评论(1) 推荐(9)