![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 82
Round moon
ACM退役云玩家。
展开
-
The 2022 ICPC Asia Regionals Online Contest - A 01 Sequence
The 2022 ICPC Asia Regionals Online Contest(I)原创 2022-09-20 19:23:45 · 530 阅读 · 0 评论 -
2020 Jiangsu Collegiate Programming Contest-A.Array
Array题目描述Yukikaze received an array (a1,a2,⋯an)as a gift. She decided to play with it. The game consists of q turns. In each turn, she will perform some kind of operation (listed below) on all elements in a subarray of a.In this problem, we define tha原创 2022-01-29 01:55:36 · 655 阅读 · 0 评论 -
约瑟夫序列 线段树 O(nlogn)
约瑟夫序列我们目前最常见的几种约瑟夫求法是通过暴力模拟所执行的。就连python 的数组切片复杂度也远远达不到O(nlogn)如果情况足够糟糕,那么切片做法复杂度可以到达O(n^2)和暴力做法没什么区别。那么我们用线段树来统计个数的方法,来记录下标。这样可以快速的查询。Accepted Code//#include<unordered_map>#include<algorithm>#include<iostream>#include<string.h&原创 2022-01-09 17:32:29 · 391 阅读 · 0 评论 -
POJ-The Unique MST
The Unique MST题目描述Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, say T = (V’, E’), with the follo原创 2021-11-06 01:23:00 · 129 阅读 · 0 评论 -
赛氪-二进制
二进制题目描述你是一个算法爱好者,在努力学习计算机知识。你知道,计算机最优美的地方在于二进制,这一点你在状压加o里面深有体会,当然二进制用在co and o时的也非常巧妙,更不用T说nini游戏都能跟于xor扯上关系了,而今天你又遇到了一道二进制的题目,对于爱思考的你,决定一直要把这道二进制题给切掉。你遇到了很多十进制的数,对于这些数,它们都管理着它们对应的分层,比如数字8,它的二进制是1,则它管理着4(10),2(10),两个分段,当数字闯的在2,4区间上增加时,沬代表二进制(10)和(10)两层原创 2021-10-24 16:34:45 · 419 阅读 · 5 评论 -
赛氪-zeal
zeal题目描述Yassin 最近在量化投资方面很有兴趣。为了研究哪只股票是真正的牛股,他把历史 nn 天每一天成交量最大的股票代码写成了一排,并构建了一套属于自己的“理论体系”。成交量多说明人气好,人气好的肯定买的人多,赚钱就要靠人气! – Yassin但是知道的人太多,这个大家都去接盘,那就都成为韭菜了 – Makik基于这个理论,Yassin 想知道 [L, R] 区间中人气“比较”好的股票有哪些,具体而言,他会给定你 L, R, k,你则需要告诉他 [L, R] 中出现 k 次的股票有原创 2021-10-22 19:50:11 · 321 阅读 · 0 评论 -
SDOI2009-HH的项链
SDOI2009-HH的项链题目描述HH 有一串由各种漂亮的贝壳组成的项链。HH 相信不同的贝壳会带来好运,所以每次散步完后,他都会随意取出一段贝壳,思考它们所表达的含义。HH 不断地收集新的贝壳,因此,他的项链变得越来越长。有一天,他突然提出了一个问题:某一段贝壳中,包含了多少种不同的贝壳?这个问题很难回答…… 因为项链实在是太长了。于是,他只好求助睿智的你,来解决这个问题。输入一行一个正整数 n,表示项链长度。第二行 n 个正整数 a_i,表示项链中第 i 个贝壳的种类。第三行一个整原创 2021-10-19 00:16:05 · 170 阅读 · 0 评论 -
HDU-Tunnel Warfare
Tunnel Warfare题目描述During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except the two at the ends, every village w原创 2021-08-28 18:10:17 · 291 阅读 · 0 评论 -
HDU-Memory Control
Memory Control题目描述原创 2021-08-20 15:16:03 · 106 阅读 · 0 评论 -
POJ-Hotel
Hotel题目描述The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent, has named the Bullmoose Hotel on famed Cumberland Street as t原创 2021-08-18 16:57:51 · 126 阅读 · 0 评论 -
HDU-Can you answer these queries?
Can you answer these queries?题目描述A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of endurance. For every at原创 2021-08-06 18:06:04 · 107 阅读 · 0 评论