随笔分类 -  4-2-STL-优先队列

摘要:贝壳找房函数最值 35.12% 1000ms 262144K 贝壳找房的攻城狮最近在研究一次函数 f(x) = ax + bf(x)=ax+b。 现在有 nn 个一次函数,f_i(x) = a_ix+b_i,\ i = \{1 \mathellipsis n\}fi​(x)=ai​x+bi​, i= 阅读全文
posted @ 2019-06-01 22:49 yzm10 阅读(542) 评论(0) 推荐(0)
摘要:题目1 : Saving Tang Monk II 题目1 : Saving Tang Monk II 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 《Journey to the West》(also 《Monkey》) is one of the Four Grea 阅读全文
posted @ 2018-09-22 19:05 yzm10 阅读(626) 评论(0) 推荐(0)
摘要:Fence Repair Farmer 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,0 阅读全文
posted @ 2017-07-23 12:05 yzm10 阅读(286) 评论(0) 推荐(0)
摘要:Battle City Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are d 阅读全文
posted @ 2017-07-22 22:49 yzm10 阅读(285) 评论(0) 推荐(0)
摘要:Stones Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a lit 阅读全文
posted @ 2017-07-22 20:49 yzm10 阅读(170) 评论(0) 推荐(0)
摘要:War chess is hh's favorite game: In this game, there is an N * M battle map, and every player has his own Moving Val (MV). In each round, every player 阅读全文
posted @ 2017-07-21 09:47 yzm10 阅读(310) 评论(1) 推荐(1)
摘要:Stall Reservations Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B 阅读全文
posted @ 2017-07-20 16:41 yzm10 阅读(315) 评论(0) 推荐(0)
摘要:Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box 阅读全文
posted @ 2017-07-18 21:51 yzm10 阅读(303) 评论(0) 推荐(0)
摘要:priority_queue的用法 priority_queue调用 STL里面的 make_heap(), pop_heap(), push_heap() 算法实现,也算是堆的另外一种形式。先写一个用 STL 里面堆算法实现的与真正的STL里面的 priority_queue用法相似的priori 阅读全文
posted @ 2017-07-18 20:32 yzm10 阅读(157) 评论(0) 推荐(0)