
图论
lqybzx
123
展开
-
bzoj 1064: [Noi2008]假面舞会
Description 一年一度的假面舞会又开始了,栋栋也兴致勃勃的参加了今年的舞会。今年的面具都是主办方特别定制的。每个参加舞会的人都可以在入场时选择一 个自己喜欢的面具。每个面具都有一个编号,主办方会把此编号告诉拿该面具的人。为了使舞会更有神秘感,主办方把面具分为k (k≥3)类,并使用特殊的技术将每个面具的编号标在了面具上,只有戴第i 类面具的人才能看到戴第i+1 类面具的人的编号原创 2014-11-19 21:35:09 · 796 阅读 · 0 评论 -
hdu 5883 The Best Path 2016ACM/ICPC青岛赛区网络赛1006
Problem Description Alice is planning her travel route in a beautiful valley. In this valley, there are N lakes, and M rivers linking these lakes. Alice wants to start her trip from one lake, a原创 2016-09-18 00:42:12 · 585 阅读 · 0 评论 -
codeforces788B Weird journey
Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — Uzhlyandia. It is widely known that Uzhlyandia has n cities connected with m bidirectio原创 2017-05-02 20:19:16 · 426 阅读 · 0 评论 -
Petrozavodsk Winter Training Camp 2018: Carnegie Mellon U Contest A. Mines
题目大意: 给你n个点,分别位于pi。每个点有个爆炸范围ri和代价ci,花费ci可以引爆某个点,并且pi-ri到pi+ri范围内的点都会被引爆。q个询问,每次修改一个点的ci,每次输出引爆所有店的最小代价。 题解: 学了下线段树优化建立边。首先对于这些爆炸关系连边所点我们可以得到一个DAG,引爆所有点的代价就是所有入度为0的点的代价最小值之和。 那么这题是区间操作,我们可以用线段树原创 2018-04-28 13:07:42 · 526 阅读 · 0 评论