关闭

福建第六届省赛 H 贪心 哈夫曼思想

ZB loves playing StarCraft and he likes Zerg most! One day, when ZB was playing SC2, he came up with an idea: He wants to change the queen's ability, the queen's new ability is to choose a worker at any time, and turn it into an egg, after K units of tim...
阅读(66) 评论(0)

洛谷P3031 [USACO11NOV](中位数,树状数组)

题目描述 Farmer John has lined up his N (1 <= N <= 100,000) cows in a row to measure their heights; cow i has height H_i (1 <= H_i <= 1,000,000,000) nanometers--FJ believes in precise measurements! He wants to take a picture of some contiguous subsequence of ...
阅读(179) 评论(0)

树上两点最近公共祖先LCA的倍增算法 poj1986

Distance Queries Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 14755 Accepted: 5187 Case Time Limit: 1000MS Description Farmer John's cows refused to run in his marathon since he chose a path much too long for their leisurely lifestyle. He ...
阅读(418) 评论(0)

ICPC2017网络赛(北京)Minimum(线段树or树状数组区间最值维护)

描述 You are given a list of integers a0, a1, …, a2^k-1. You need to support two types of queries: 1. Output Minx,y∈[l,r] {ax∙ay}. 2. Let ax=y. 输入 The first line is an integer T, indicating the number of test cases. (1≤T≤10). For each test case: The fi...
阅读(233) 评论(0)

bzoj 1012 [JSOI2008]最大数maxnumber(ST表最值查询——RMQ算法)

1012: [JSOI2008]最大数maxnumber Time Limit: 3 Sec Memory Limit: 162 MB Submit: 11110 Solved: 4859 [Submit][Status][Discuss] Description   现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L 个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加 上t,其中t是最近一...
阅读(378) 评论(0)
19条 共4页1 2 3 4 下一页 尾页
    个人资料
    • 访问:62120次
    • 积分:2202
    • 等级:
    • 排名:第19064名
    • 原创:159篇
    • 转载:9篇
    • 译文:0篇
    • 评论:29条
    博客专栏
    最新评论