标签 - 好题

数位dp 好题 lucas定理    2017-05-04 21:28:21    277    0    0

好题 treap 补集转化    2017-03-04 15:04:32    115    1    0


FFT 好题    2017-01-03 20:21:37    164    0    0

Ladies' Shop

Description

A ladies' shop has recently opened in the city of Ultima Thule. To get ready for the opening, the shop bought n bags. Each bag is characterised by the total weight ai of the items you can put there. The weird thing is, you cannot use these bags to put a set of items with the total weight strictly less than ai. However the weights of the items that will be sold in the shop haven't yet been defined. That's what you should determine right now.

Your task is to find the set of the items' weights p1, p2, ..., pk (1 ≤ p1 < p2 < ... < pk), such that:

  1. Any bag will be used. That is, for any i (1 ≤ i ≤ n) there will be such set of items that their total weight will equal ai. We assume that there is the infinite number of items of any weight. You can put multiple items of the same weight in one bag.
  2. For any set of items that have total weight less than or equal to m, there is a bag into which you can put this set. Similarly, a set of items can contain multiple items of the same
对偶图 好题 并查集    2016-12-02 20:02:24    298    0    0

平面图转对偶图

并查集 分治 好题    2016-11-14 13:58:22    333    0    0
 
 
 

题目大意

给定一棵有n个点的树,每条边有承受区间[li;ri]。
m次询问,每次给定一个值speed,求一条最长的链,使得上面所有边的承受区间都包括speed。
n,m≤70000


1/2