
=========数据结构进阶==========
文章平均质量分 78
MiaoPlus
不要假装自己很努力,因为结果不会陪你演戏
展开
-
HrbustOJ.1073.病毒(并查集)
病毒Time Limit: 1000 MSMemory Limit: 65536 KTotal Submit: 3227(788 users)Total Accepted: 1092(689 users)Rating: Special Judge: NoDescription某种病毒袭击了某地区,该地区有N(1≤N≤50000)人,分别编号为0,1,...,N-1,现在0号已被确诊,所有0的直接朋...原创 2018-03-26 15:39:58 · 324 阅读 · 0 评论 -
HDU.1754.I Hate It(线段树)
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5...原创 2018-08-08 09:29:35 · 188 阅读 · 0 评论 -
Hdu.1166.敌兵布阵(树状数组)
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 117174 Accepted Submission(s): 49084 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国...原创 2018-07-20 16:19:29 · 158 阅读 · 0 评论 -
Poj.3264.Balanced Lineup(线段树)
Poj.3264.Balanced LineupFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of t...原创 2018-03-11 17:58:44 · 190 阅读 · 0 评论 -
POJ.3264.Balanced Lineup(线段树 或 RMQ)
D - Balanced LineupTime Limit: 5000 MS Memory Limit: 0 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 5...原创 2018-05-05 09:58:15 · 193 阅读 · 0 评论 -
线段树
线段树(Segment Tree)是一种基于分治思想的二叉树结构,用于在区间上进行信息统计。与按照二进制位(2的次幂)进行区间划分的树状数组相比,线段树是一种更加通用的结构: 1.线段树的每一个节点都表示一个区间。 2.线段树具有唯一的根节点,代表的区间是整个统计范围,如[1,N]。 3.线段树的每一个叶节点都代表一个长度为1的元区间[x,x]。 4.对于每个内...原创 2018-05-05 11:38:18 · 456 阅读 · 1 评论 -
POJ.3468.A Simple Problem with Integers(线段树)
C - A Simple Problem with IntegersTime Limit: 5000 MS Memory Limit: 0 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionYou have N integers, A1, A2, ... , AN. ...原创 2018-05-06 10:37:38 · 175 阅读 · 0 评论 -
Hdu.1213.How Many Tables(并查集)
Hdu.1213.How Many Tables Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at...原创 2018-03-10 10:26:59 · 263 阅读 · 0 评论 -
2018广西省赛.GXBalloons(并查集)
问题 G: GXBalloons 时间限制: 1 Sec 内存限制: 128 MB 提交: 77 解决: 28 [提交] [状态] [讨论版] [命题人:admin] 题目描述 The competition is going. Besides the players, volunteers are busy too, they need to send colorful balloon...原创 2018-08-31 14:03:26 · 353 阅读 · 0 评论