首页 > TAG信息列表 > ABC214

ABC214 E - Packing Under Range Regulations(贪心)

目录 Description State Input Output Solution Code Description 有 \(n\) 个小球,每个小球必须在其所在的区间 \([l,r]\),问是否可以放下所有小球 State \(1<=T<=2*10^5\) \(1<=n<=2*10^5\) \(1<=l<=r<=10^9\) Input 2 3 1 2 2 3 3 3 5 1 2 2 3 3 3 1 3 999999999 10000

ABC214 E-Packing Under Range Regulation(贪心)

目录 Description State Input Output Solution Code Description 有 \(n\) 个小球,每个小球要放在对应的区间 \([l_i, r_i]\),问是否可以满足所有小球的条件 State \(1<=T<=2*10^5\) \(1<=N<=2*10^5\) \(1<=l_i<=r_i<=10^9\) Input 2 3 1 2 2 3 3 3 5 1 2 2 3 3 3 1 3 999

ABC214 D - Sum of Maximum Weights(并查集+图论)

目录 Description State Input Output Solution Code Description 有一棵树,计算 \(\sum_{i=1}^{n-1}\sum_{j=i+1}^{n}f(i,j)\), 其中 \(f(i,j)\) 代表 \(i,j\) 两个节点之间最短路径上的最大边权 State \(1<=n<=10^{5}\) \(1<=u,v<=n\) \(1<=w<=10^7\) Input 5 1 2 1