2016年2月15日

【HDOJ】4729 An Easy Problem for Elfness

摘要: 其实是求树上的路径间的数据第K大的题目。果断主席树 + LCA。初始流量是这条路径上的最小值。若a<=b,显然直接为s->t建立pipe可以使流量最优;否则,对【0, 10**4】二分得到boundry,使得boundry * n_edge - sum_edge <= k/b, 或者建立s->t,然 阅读全文

posted @ 2016-02-15 15:04 Bombe 阅读(263) 评论(0) 推荐(0) 编辑

【HDOJ】3727 Jewel

摘要: 静态区间第K大值。主席树和划分树都可解。 1 /* 3727 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queue> 7 #include <set> 阅读全文

posted @ 2016-02-15 01:30 Bombe 阅读(120) 评论(0) 推荐(0) 编辑

【HDOJ】4251 The Famous ICPC Team Again

摘要: 划分树模板题目,主席树也可解。划分树。 1 /* 4251 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queue> 7 #include <set> 8 阅读全文

posted @ 2016-02-15 00:30 Bombe 阅读(127) 评论(0) 推荐(0) 编辑

导航