上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 97 下一页
摘要: 【概述】 离散化是数据结构中的一个常用技巧,其可以有效的降低时空复杂度,其基本思想就是在众多可能的情况中,只去考虑需要用到的值,通过离散化,可以改进低效的算法,甚至实现根本不可能实现的算法。 对于一些数量较少,但数值较大或者可能出现负数这种难以处理的数据,自身... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(142) 评论(0) 推荐(0)
摘要: Problem Description Sona , Maven of the Strings . Of cause, she can play the zither. Sona can't speak but she can make fancy m... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(96) 评论(0) 推荐(0)
摘要: Problem Description The Little Elephant loves playing with arrays. He has array a, consisting of n positive integers, indexed f... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(24) 评论(0) 推荐(0)
摘要: Problem Description Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(20) 评论(0) 推荐(0)
摘要: Problem Description An array of positive integers a1, a2, ..., an is given. Let us consider its arbitrary subarray al, al + 1..... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(35) 评论(0) 推荐(0)
摘要: Problem Description Given an array of N integers indexed from 1 to N, and q queries, each in the form i j, you have to find the... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(20) 评论(0) 推荐(0)
摘要: Problem Description 作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命…… 具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(25) 评论(0) 推荐(0)
摘要: 【概述】 莫队算法(mo's algorithm)是用来解决离线区间不修改询问问题,可以将复杂度优化到 O(n^1.5),除去普通的莫队算法外,还有带修改的莫队、树上莫队等等。 莫队常用于维护区间答案,比如:对于一个长度为 n 的序列,给出 m 次询问,每次询... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(29) 评论(0) 推荐(0)
摘要: Problem Description liympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winn... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(0) 评论(0) 推荐(0)
摘要: Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, withou... 阅读全文
posted @ 2022-09-20 22:58 老程序员111 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 97 下一页