上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 58 下一页
摘要: 因为sort只支持对可随机访问的容器进行排序,是不支持队列和栈的;所以这里介绍优先队列 优先队列功能:对数据自动排序 1、默认排序,从大到小 2、从大到小排序-less 3、从小到大排序-greate 结构体类型:重载大于号和小于号 先构建cmp函数在重载 优先队列没有p.front()操作,返回队 阅读全文
posted @ 2019-08-01 21:30 知道了呀~ 阅读(385) 评论(0) 推荐(0) 编辑
摘要: Problem B: Bulbs Greg has an m×n grid of Sweet Lightbulbs of Pure Coolness he would like to turn on. Initially, some of the bulbs are on and some are 阅读全文
posted @ 2019-08-01 11:44 知道了呀~ 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Problem I: Ingenious Lottery Tickets Your friend Superstitious Stanley is always getting himself into trouble. This time, in his Super Lotto Pick and 阅读全文
posted @ 2019-08-01 11:26 知道了呀~ 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 86291 Accepted: 24772 Description The citizens of Bytetown, AB, could not s 阅读全文
posted @ 2019-08-01 11:18 知道了呀~ 阅读(267) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 163977 Accepted: 50540 Case Time Limit: 2000MS Description 阅读全文
posted @ 2019-07-29 21:16 知道了呀~ 阅读(278) 评论(0) 推荐(0) 编辑
摘要: Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 26443 Accepted: 12639 Description Railway tickets were difficult to buy around 阅读全文
posted @ 2019-07-29 15:44 知道了呀~ 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 线段树它是一棵高度平衡的二叉树,很多二叉树的性质它是完美继承的 我们来看一道题: HDU1166敌兵布阵 这道题如果用常规暴力的做法,就把所有营地的士兵存在一个数组里面,然后对于每次操作直接更新对应位置的数,对于每次询问直接从i到j加起来。然而这么操作下来,对于极限数据50000个人,40000条命 阅读全文
posted @ 2019-07-28 21:26 知道了呀~ 阅读(627) 评论(0) 推荐(0) 编辑
摘要: E.Easy Climb Somewhere in the neighborhood we have a very nice mountain that gives a splendid view over the surrounding area. There is one problem tho 阅读全文
posted @ 2019-07-28 17:16 知道了呀~ 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 我们从最简单的问题开始: 给定一个长度为N的整数数列a(i),i=0,1,...,N-1和窗长度k. 要求: f(i) = max{a(i-k+1),a(i-k+2),..., a(i)},i = 0,1,...,N-1 问题的另一种描述就是用一个长度为k的窗在整数数列上移动,求窗里面所包含的数的最 阅读全文
posted @ 2019-07-28 10:14 知道了呀~ 阅读(354) 评论(0) 推荐(0) 编辑
摘要: Feel Good Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 11626 Accepted: 3212Case Time Limit: 1000MS Special JudgeDescriptionBill is develo 阅读全文
posted @ 2019-07-27 15:27 知道了呀~ 阅读(282) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 58 下一页