主席树
还是太年轻
这个作者很懒,什么都没留下…
展开
-
POJ 2104 K-th Number(主席树)
K-th NumberTime Limit: 20000MS Memory Limit: 65536KTotal Submissions:66103 Accepted: 23288Case Time Limit: 2000MSDescriptionYou are working for Macrohard company in data structures department. After f...原创 2018-06-14 16:15:29 · 150 阅读 · 0 评论 -
ZOJ 2112 Dynamic Rankings(求动态区间第k大,树状数组套主席树)
Dynamic RankingsTime Limit: 10 Seconds Memory Limit: 32768 KBThe Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find t...原创 2018-07-29 15:04:29 · 179 阅读 · 0 评论 -
BZOJ 2653: middle(二分+主席树)
Description一个长度为n的序列a,设其排过序之后为b,其中位数定义为b[n/2],其中a,b从0开始标号,除法取下整。给你一个长度为n的序列s。回答Q个这样的询问:s的左端点在[a,b]之间,右端点在[c,d]之间的子序列中,最大的中位数。其中a<b<c<d。位置也从0开始标号。我会使用一些方式强制你在线。 Input第一行序列长度n。接下来n行...原创 2018-07-31 20:37:56 · 184 阅读 · 0 评论 -
SPOJ COT - Count on a tree(LCA+主席树)
COT - Count on a tree#tree You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight.We will ask you to perform the following operation:u v ...原创 2018-08-02 09:31:42 · 159 阅读 · 0 评论