![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 75
寂静山林
这个作者很懒,什么都没留下…
展开
-
第2章 数据结构:2.11.1 线段树
原创 2020-06-03 17:21:19 · 302 阅读 · 0 评论 -
11990 Dynamic Inversion(动态逆序对)
UVa 11990 Dynamic Inversion(动态逆序对)给定 {1,2,3,…,n}\{1,2,3,…,n\}{1,2,3,…,n} 的一个排列,从排列中每次删除一个数字,共删除 mmm 个数字,在每次删除数字之前输出该排列的逆序对数。数组 AAA 的逆序对数定义为二元组(iii,jjj)的数量:i<ji<ji<j 且 A[i]>A[j]A[i]>A[j]A[i]>A[j]。输入输入包含多组测试数据。每组测试数据的第一行包含两个整数 nnn 和 m(1≤原创 2020-05-25 16:23:24 · 525 阅读 · 0 评论 -
第二章 数据结构:2.10 二叉树
原创 2020-05-22 15:26:56 · 205 阅读 · 0 评论 -
第二章 数据结构:2.1.4 约瑟夫问题
原创 2020-05-21 23:14:48 · 197 阅读 · 0 评论 -
根号分块
根号分块(sqrt decomposition),类似于稀疏表,也是一种通过预处理来提高查询效率的数据结构(或者说“技巧”),它能够以 O(n)O(\sqrt{n})O(n) 的时间复杂度完成诸如区间最大/小值查询,区间求和的操作。其核心思想是将数组分割为大小相同的“块”,在块中进行操作,便于提高速度。下面以区间求和为例来介绍根号分块的应用。给定长度为 nnn 的数组,数组元素为 a[1]a[...原创 2020-05-01 07:03:21 · 886 阅读 · 0 评论 -
UVa Problem 122 - Trees on the level
// UVa Problem 122 - Trees on the level// Verdict: Accepted// Submission Date: 2011-12-25// UVa Run Time: 0.008s//// 版权所有(C)2011,邱秋。metaphysis # yeah dot net//// [解题方法]// 本题可以归结为数据结构问题。步骤是建立树结原创 2011-12-25 21:29:36 · 4396 阅读 · 0 评论 -
UVa Problem 112 - Tree Summing
// UVa Problem 112 - Tree Summing// Verdict: Accepted// Submission Date: 2011-11-26// UVa Run Time: 0.304s//// 版权所有(C)2011,邱秋。metaphysis # yeah dot net//// [解题方法]// 本题可以归结为数据结构问题。//// 使用链表来表原创 2011-12-02 14:51:54 · 1679 阅读 · 0 评论 -
UVa Problem 105 - Skyline Problem
// UVa Problem 105 - Skyline Problem// Verdict: Accepted// Submission Date: 2011-11-22// UVa Run Time: 0.036s//// 版权所有(C)2011,邱秋。metaphysis # yeah dot net//// [解题方法]// 最初是想把交点都求出来,然后判断交点是否在矩形内原创 2011-11-22 22:27:06 · 1316 阅读 · 1 评论 -
UVa Problem 10158 War (战争)
// War (战争)// PC/UVa IDs: 111005/10158, Popularity: B, Success rate: average Level: 3// Verdict: Accepted// Submission Date: 2011-10-07/原创 2011-10-07 16:56:45 · 2636 阅读 · 0 评论 -
UVa Problem 10205 Stack ’em Up (完美洗牌术)
// Stack ’em Up (完美洗牌术)// PC/UVa IDs: 110205/10205, Popularity: B, Success rate: average Level: 1// Verdict: Accepted// Submission Date:原创 2011-05-19 15:24:00 · 2759 阅读 · 3 评论 -
UVa Problem 10315 Poker Hands (扑克牌型)
// Poker Hands (扑克牌型)// PC/UVa IDs: 110202/10315, Popularity: C, Success rate: average Level: 2// Verdict: Accepted// Submission Date: 20原创 2011-05-19 14:53:00 · 3483 阅读 · 0 评论 -
UVa Problem 10050 Hartals (罢工)
// Hartals (罢工)// PC/UVa IDs: 110203/10050, Popularity: B, Success rate: high Level: 2// Verdict: Accepted// Submission Date: 2011-05-23原创 2011-05-19 14:55:00 · 2561 阅读 · 0 评论 -
UVa Problem 10258 Contest Scoreboard (比赛计分板)
// Contest Scoreboard (比赛计分板)// PC/UVa IDs: 110207/10258, Popularity: B, Success rate: average Level: 1// Verdict: Accepted// Submission原创 2011-05-19 15:40:00 · 2277 阅读 · 0 评论 -
UVa Problem 10038 Jolly Jumpers (快乐的跳跃者)
// Jolly Jumpers (快乐的跳跃者)// PC/UVa IDs: 110201/10038, Popularity: A, Success rate: average Level: 1// Verdict: Accepted// Submission Date原创 2011-05-19 14:46:00 · 4353 阅读 · 6 评论