
主席树
nike0good
这个作者很懒,什么都没留下…
展开
-
HDU 2665(Kth number-区间第k大[内存限制+重数])
Kth number Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3155 Accepted Submission(s): 1055 Problem Description Give you a sequenc原创 2013-06-17 16:55:17 · 1169 阅读 · 0 评论 -
BZOJ 3218(a + b Problem-二分图套值域线段树)
出这题的人是怎么想出来的…… 言归正传,这题是二分图套值域线段树。 首先经过 @Vfleaking的神奇建图后,把图拆成二分图, 不妨利用有向图最小割的性质建图(以前我一直以为最小割和边的方向无关,可这样的话很奇怪哦……) 理解悲剧…… 我们可以利用边有向的性质解决黑白色块…… 然后发现线段树很多……主席树闪亮登场 然后·就这麽A了?………… #include #include #原创 2013-06-19 13:21:53 · 2082 阅读 · 0 评论 -
SPOJ 10628(COT-树上第k大-函数式线段树)
SPOJ Problem Set (classical) 10628. Count on a tree Problem code: COT You are given a tree with N nodes.The tree nodes are numbered from 1 to N.Each node has an integer weight. W原创 2013-06-21 13:22:02 · 1814 阅读 · 0 评论 -
BC 2015年百度之星程序设计大赛 - 初赛(1)(KPI-主席树)
KPI Accepts: 517 Submissions: 2185 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 你工作以后, KPI 就是你的全部了. 我开发了一个服务,取得了很大的知名度原创 2015-06-03 13:50:35 · 1580 阅读 · 0 评论 -
POJ 2104(K-th Number-区间第k大-主席树)
K-th Number Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 31790 Accepted: 9838 Case Time Limit: 2000MS Description You are working for Macrohard co原创 2013-06-17 16:43:29 · 1965 阅读 · 0 评论 -
HDU 4866(Shooting-主席树)
离散化注意, 注意把栈开大。#include<cstdio> #include<cstring> #include<cstdlib> #include<iostream> #include<cmath> #include<cctype> #include<ctime> #include<iomanip> #include<vector> #include<string> #include<que原创 2016-08-04 23:10:06 · 459 阅读 · 0 评论